action storecove_get_invoice_json { label: "Get Purchase invoice data as JSON" description: "Get a specific PurchaseInvoice, in JSON format." provider: storecove method: GET path: "/purchase_invoices/{guid}" encoding: json input: { type: "object" properties: { guid: { type: "string" format: "uuid" } pmv: { type: "string" } } required: ["guid"] additionalProperties: false } output: { properties: { accounting: { properties: { code: { type: "string" description: "The the code of the general ledger account." } list: { type: "string" description: "The name of the list for the code, e.g. \"RGS\"." } list_version: { type: "string" description: "The version of the list for the code, e.g. \"1.1\"." } name: { type: "string" description: "A textual description of the code." } } } accounting_cost: { type: "string" description: "The accounting cost code." } allowance_charge: { type: "number" description: "DEPRECATED - Use the allowance_charges array." } allowance_charges: { type: "array" items: { properties: { amount_excluding_tax: { type: "number" description: "The amount excluding tax." } amount_excluding_vat: { type: "string" description: "DEPRECATED - use amount_excluding_tax." } reason: { type: "string" description: "The reason for the allowance or charge." } tax: { properties: { tax: { type: "object" description: "The tax element." properties: { amount: { type: "number" description: "The tax amount." } category: { type: "string" description: "The tax category." enum: ["standard", "zero_rated", "reverse_charge", "intra_community", "exempt", "export", "outside_scope", "regulation33_exempt", "nonregulation33_exempt", "deemed_supply", "srca_s", "srca_c", "not_registered", "igst", "cgst", "sgst", "cess", "state_cess", "srovr", "srovr_rs", "srovr_lvg", "srlvg"] } category_code: { type: "string" description: "Deprecated. The tax category code." } country: { type: "string" description: "The tax country." } percentage: { type: "number" description: "The tax percentage." } type: { type: "string" description: "The tax type." enum: ["VAT", "GST"] } } } } } vat: { type: "object" description: "DEPRECATED - Use tax." properties: { amount: { type: "string" description: "The VAT country." } percentage: { type: "string" description: "The VAT percentage." } } } } } } amount_including_vat: { type: "number" description: "DEPRECATED - Use amount_including_tax." } attachments: { type: "array" items: { properties: { content_type: { type: "string" description: "The attachment content type (mime type)." } document: { type: "string" description: "The Base64 encoded document attachment." } } } } billing_reference: { type: "string" description: "Reference to the previous invoice this invoice relates to." } buyer_reference: { type: "string" description: "Reference provided by the buyer. Used for routing." } contract_document_reference: { type: "string" description: "Reference to the contract." } delivery: { type: "object" description: "The details of the delivery associated with this invoice." properties: { actual_date: { type: "string" description: "The actual delivery date." } location: { type: "object" description: "The location the goods/services were delivered to." properties: { building_number: { type: "string" description: "The building number. Used in SA." } city: { type: "string" description: "Address city." } country: { type: "string" description: "Address country." } county: { type: "string" description: "Address county." } department: { type: "string" description: "Department name." } id: { type: "string" description: "The id of the location." } line1: { type: "string" description: "Address line 1." } line2: { type: "string" description: "Address line 2." } neighborhood: { type: "string" description: "The neighborhood. Used in SA." } scheme_id: { type: "string" description: "The scheme id for the id of the location." } secondary_number: { type: "string" description: "The secondary number. Used in SA." } zip: { type: "string" description: "Address zip code" } } } party: { type: "object" description: "The party the goods/services were delivered to." properties: { name: { type: "string" description: "The name of the deliveyr party." } } } } } document: { type: "string" description: "DEPRECATED. Use the new atatchments array." } document_currency_code: { type: "string" description: "The ISO 4217 currency for the invoice." } document_totals: { properties: { payable: { type: "number" description: "The total invoice amount payable including tax." } prepaid: { type: "number" description: "The amount already paid." } rounding: { type: "number" description: "The difference between the payable amount and the total invoice amount including tax." } total: { type: "number" description: "The total invoice amount, including tax. This is equal to the sum of the invoice_lines (amount_excluding_tax + tax.amount) and the allowances and charges." } } } document_type: { type: "string" description: "The type of document. Only \"invoice\" for now." enum: ["invoice"] } due_date: { type: "string" description: "The date the invoice must be payed by. Format \"YYYY-MM-DD\"." } external_key: { type: "string" description: "Deprecated. Used for accountants. The id you specified for the organization." } external_user_id: { type: "string" description: "Deprecated. Used for the embedded portal retrieval service. The external_user_id you provided when the ShopAccount was created." } guid: { type: "string" format: "uuid" description: "The GUID of the invoice" } invoice_lines: { type: "array" items: { properties: { accounting: { type: "object" additionalProperties: true } allowance_charge: { type: "number" description: "DEPRECATED - use allowance_charges." } allowance_charge_array: { type: "array" items: { properties: { amount: { type: "number" description: "The amount of the allowance or charge." } reason: { type: "string" description: "The reason for the allowance or charge." } } } } allowance_charges: { type: "array" description: "Deprecated." items: { type: "number" } } amount_excluding_tax: { type: "number" description: "The amount excluding Tax. This is equal to quantity x price_amount + ∑ allowance_charges." } amount_excluding_vat: { type: "number" description: "DEPRECATED - use amount_excluding_tax. The amount excluding VAT." } description: { type: "string" description: "The description for the invoice line." } name: { type: "string" description: "A short name for the invoice line." } period_end: { type: "string" description: "The end date of the period this invoice line relates to. Format \"YYYY-MM-DD\"." } period_start: { type: "string" description: "The start date of the period this invoice line relates to. Format \"YYYY-MM-DD\"." } price: { properties: { base_quantity: { type: "number" description: "The number of items the price is for. Can have up to digits." } price_amount: { type: "number" description: "The price for one item, excluding VAT. Can have up to digits." } } } tax: { type: "object" additionalProperties: true } units: { properties: { quantity: { type: "number" description: "The quantity of the item. Can have up to digits." } unit_code: { type: "string" description: "The unit code of the quantity." } } } vat: { type: "object" description: "DEPRECATED - use tax. The VAT details for the invoice line." properties: { amount: { type: "number" description: "The amount of VAT for the invoice line." } country: { type: "string" description: "The ISO 3166 country of the VAT for the invoice line." } percentage: { type: "number" description: "The percentage of VAT for the invoice line." } } } } } } invoice_number: { type: "string" description: "The invoicenumber." } invoice_type: { type: "string" description: "The type of invoice." enum: ["invoice", "creditnote", "correctioninvoice"] } issue_date: { type: "string" description: "The date the invoice was issued. Format \"YYYY-MM-DD\"." } legal_entity_id: { type: "integer" format: "int64" description: "The id of the LegalEntity the invoice was received for." } note: { type: "string" description: "The invoice level note." } order_reference: { type: "string" description: "Reference to the order. Used for matching the invoice to an order." } payment_means: { type: "object" description: "DEPRECATED - Use the new payment_means_array array." properties: { iban: { type: "string" description: "The IBAN to which to transfer." } id: { type: "string" description: "An id to mention in the transfer." } } } payment_means_array: { type: "array" description: "The different payment means that can be used to pay the invoice." items: { properties: { account: { type: "string" description: "The account number to which to transfer." } branch_code: { type: "string" description: "The code identifying the bank branch. May contain a BIC/SWIFT or something appropriate for the payment method, such as \"NPP\" for type NppPaymentMean." } holder: { type: "string" description: "The account holder name to which to transfer." } mandate: { type: "string" description: "The mandate, used only for type DirectDebitPaymentMean." } network: { type: "string" description: "The payment network. Used only for type CardPaymentType." } payment_id: { type: "string" description: "The payment id to use when making the payment. The invoice sender will use this to match the received funds to the invoice." } type: { description: "The type of payment means. Which type are returned is determined by the &pmv= query parameter. For details see documentation for that field." enum: ["BankPaymentMean", "DirectDebitPaymentMean", "CardPaymentMean", "NppPaymentMean", "SeBankGiroPaymentMean", "SePlusgiroPaymentMean", "SgCardPaymentMean", "SgGiroPaymentMean", "SgPaynowPaymentMean", "CreditTransferPaymentMean", "CreditCardPaymentMean", "SeBankgiroPaymentMean", "AunzNppPayidPaymentMean", "OnlinePaymentServicePaymentMean", "StandingAgreementPaymentMean", "AunzNppPaytoPaymentMean", "AunzBpayPaymentMean", "AunzPostbillpayPaymentMean", "AunzUriPaymentMean"] type: "object" } } } } payment_means_payment_id: { type: "string" description: "DEPRECATED - use the payment_id property in the payment_means_array" } payment_terms_note: { type: "string" description: "A textual description of the payment terms." } period_end: { type: "string" description: "The end date of the period this invoice relates to. Format \"YYYY-MM-DD\"." } period_start: { type: "string" description: "The start date of the period this invoice relates to. Format \"YYYY-MM-DD\"." } project_reference: { type: "string" description: "Reference to the project." } sender: { properties: { billing_contact: { properties: { email: { type: "string" description: "The email of the billing contact." } first_name: { type: "string" description: "The first name of the billing contact." } last_name: { type: "string" description: "The last name of the billing contact." } } } building_number: { type: "string" description: "The building number. Used in SA." } city: { type: "string" description: "The city." } country: { type: "string" description: "The country." } county: { type: "string" description: "The county." } department: { type: "string" description: "The department who sent the invoice." } identifiers: { type: "array" description: "The array of identifiers for this sender." items: { properties: { corppass: { properties: { client_redirect_fail_url: { type: "string" description: "The URL the CorpPass system will redirect to in case of a failure to perform identity verfication." } client_redirect_success_url: { type: "string" description: "The URL the CorpPass system will redirect to in case of successful identity verfication." } corppass_url: { type: "string" description: "The CorpPass redirect URL." } enabled: { type: "boolean" description: "Whether or not the CorpPass flow is enabled." } flow_type: { type: "string" description: "The CorpPass flow type." enum: ["corppass_flow_redirect", "corppass_flow_email"] } signer_email: { type: "string" description: "The email of the person who is going to perform the CorpPass process." } signer_name: { type: "string" description: "The name of the person who is going to perform the CorpPass process." } simulate_corppass: { type: "boolean" description: "Whether or not CorpPass is being simulated." } status: { type: "string" description: "The status of the CorpPass process." enum: ["corppass_no_status,", "corppass_initiated,", "corppass_cancelled,", "corppass_failed,", "corppass_succeeded"] } } } identifier: { type: "string" description: "The identifier." } scheme: { type: "string" description: "The scheme of the identifier. See <<_receiver_identifiers_list>> for a list." } superscheme: { type: "string" description: "The superscheme of the identifier. Should always be \"iso6523-actorid-upis\"." } } } } legal_name: { type: "string" description: "The legal name of the party who sent the invoice." } line1: { type: "string" description: "The address" } line2: { type: "string" description: "The address, line 2" } neighborhood: { type: "string" description: "The neighborhood. Used in SA." } party_name: { type: "string" description: "The party who sent the invoice." } peppol_identifiers: { type: "object" additionalProperties: true } secondary_number: { type: "string" description: "The secondary number. Used in SA." } zip: { type: "string" description: "The zip code." } } } source: { type: "string" description: "The source the invoice was received from." enum: ["peppol", "script", "supplier", "email"] } sub_type: { type: "string" description: "The subtype of document." enum: ["invoice", "creditnote", "correctioninvoice"] } system_generated_primary_image: { type: "boolean" description: "Whether or not the document image (PDF) was generated by Storecove. If true, it means the invoice was received without any attachments and Storecove generated one for you. If false, the invoice will contain at least one attachment, which was received from the invoice sender." } tax_point_date: { type: "string" description: "The date the invoice was issued for tax purposes. In most countries MUST match the issue_date. Format \"YYYY-MM-DD\"." } tax_subtotals: { type: "array" items: { properties: { amount_excluding_tax: { type: "number" description: "The amount excluding tax." } amount_excluding_vat: { type: "string" description: "DEPRECATED - use amount_excluding_tax." } tax: { type: "object" additionalProperties: true } vat: { type: "object" additionalProperties: true } } } } tax_system: { type: "string" description: "The tax system of the invoice. Either tax_line_percentages or tax_line_amounts. The first tax system means the invoice lines contain only the tax percentages and the tax amounts are included only in the tax subtotals at the invoice level and so are only calculated at the invoice level. The tax system tax_line_amounts means that in addition to the percentage, each invoice line also contains the tax amount. The tax subtotals at the invoice level are calculated as the sum of the tax of the invoice lines. The distinction between the two tax systems has has implications for rounding." } vat_reverse_charge: { type: "boolean" description: "DEPRECATED - This is now part of each invoice line." } } } }