# Get invoice

## GET /public/v1/billing/invoices/{id}

>

```json
{"openapi":"3.0.1","info":{"title":"Marketplace API","version":"5.0.5395-g5217d266"},"servers":[{"url":"https://api.platform.softwareone.com"}],"paths":{"/public/v1/billing/invoices/{id}":{"get":{"tags":["Invoices"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"select","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"Invoice":{"type":"object","properties":{"audit":{"allOf":[{"$ref":"#/components/schemas/InvoiceAuditBag"}],"description":"Represents a container for audit-related events for an invoice"},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"revision":{"type":"integer","format":"int32"},"id":{"type":"string","description":"The unique identifier of the invoice."},"countryCode":{"type":"string","description":"The country code."},"documentNo":{"type":"string","description":"The document number assigned by the ERP system."},"externalIds":{"allOf":[{"$ref":"#/components/schemas/ErpExternalIds"}],"description":"Invoice external ids."},"buyer":{"type":"object","allOf":[{"$ref":"#/components/schemas/BuyerRef"}]},"seller":{"type":"object","allOf":[{"$ref":"#/components/schemas/SellerRef"}]},"attributes":{"allOf":[{"$ref":"#/components/schemas/InvoiceErpAttributes"}],"description":"ERP attributes associated with the entity."},"status":{"allOf":[{"$ref":"#/components/schemas/InvoiceStatus"}],"description":"The current status of the invoice."},"statement":{"type":"object","allOf":[{"$ref":"#/components/schemas/StatementRef"}]},"agreement":{"type":"object","allOf":[{"$ref":"#/components/schemas/AgreementRef"}]},"billingType":{"allOf":[{"$ref":"#/components/schemas/BillingType"}],"description":"The billing type associated with the invoice."},"client":{"type":"object","allOf":[{"$ref":"#/components/schemas/AccountRef"}]},"clientId":{"type":"string","description":"The client identifier associated with the invoice, if any.","nullable":true},"licensee":{"type":"object","allOf":[{"$ref":"#/components/schemas/LicenseeRef"}]},"product":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProductRef"}]},"vendor":{"type":"object","allOf":[{"$ref":"#/components/schemas/AccountRef"}]},"erpData":{"allOf":[{"$ref":"#/components/schemas/InvoiceErpData"}],"description":"ERP-specific data related to the invoice, if available."},"price":{"allOf":[{"$ref":"#/components/schemas/InvoicePrice"}],"description":"Pricing details of the invoice, if available."},"lines":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceLine"},"description":"The list of invoice lines associated with the invoice."},"analytics":{"allOf":[{"$ref":"#/components/schemas/AnalyticsInfo"}],"description":"Analytics information related to the credit invoice."}},"additionalProperties":false,"description":"Represents an invoice entity in the billing system."},"InvoiceAuditBag":{"type":"object","properties":{"created":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"updated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"issued":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the invoice reached the \"Issued\" status.","nullable":true},"paid":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the invoice reached the \"Paid\" status.","nullable":true},"overdue":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the invoice reached the \"Overdue\" status.","nullable":true}},"additionalProperties":false,"description":"Represents a container for audit-related events for an invoice"},"PlatformObjectEvent":{"type":"object","properties":{"at":{"type":"string","format":"date-time","nullable":true},"by":{"type":"object","allOf":[{"$ref":"#/components/schemas/PlatformIdentityRef"}]}},"additionalProperties":false},"PlatformIdentityRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"}},"additionalProperties":false},"PlatformMetadata":{"type":"object","properties":{"omitted":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"ErpExternalIds":{"type":"object","properties":{"statement":{"type":"string","description":"Statement identifier.","nullable":true},"customer":{"type":"string","description":"Bill to customer identifier.","nullable":true},"agreement":{"type":"string","description":"Agreement identifier.","nullable":true}},"additionalProperties":false,"description":"Represents invoice references ."},"BuyerRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"}},"additionalProperties":false},"SellerRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"externalId":{"type":"string","nullable":true}},"additionalProperties":false},"InvoiceErpAttributes":{"type":"object","properties":{"postingDate":{"type":"string","description":"The date when the invoice was posted.","format":"date-time","nullable":true},"documentDate":{"type":"string","description":"The date when the document was created.","format":"date-time","nullable":true},"externalDocumentNo":{"type":"string","description":"The external document number associated with the invoice.","nullable":true},"externalDocumentNo2":{"type":"string","description":"The second external document number associated with the invoice.","nullable":true},"yourReference":{"type":"string","description":"Can be the custom reference (free text) or the statement ID (fixed format).","nullable":true},"dueDate":{"type":"string","description":"The due date for the invoice payment.","format":"date-time","nullable":true},"orderNo":{"type":"string","description":"The order number associated with the invoice. Also known as \"Sales Order ID\".","nullable":true},"quoteNo":{"type":"string","description":"The quote number associated with the invoice.","nullable":true}},"additionalProperties":false,"description":"Attributes related to ERP systems for an invoice."},"InvoiceStatus":{"enum":["Issued","Paid","Overdue"],"type":"string","description":"Represents the various statuses an invoice can have in the billing system."},"StatementRef":{"type":"object","properties":{"revision":{"type":"integer","format":"int32"},"id":{"type":"string","description":"The unique identifier of the statement."}},"additionalProperties":false,"description":"Represents a billing statement in the system, containing details about transactions, pricing, and associated entities."},"AgreementRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"status":{"allOf":[{"$ref":"#/components/schemas/AgreementStatus"}]}},"additionalProperties":false},"AgreementStatus":{"enum":["New","Draft","Provisioning","Updating","Active","Terminated","Failed","Deleted"],"type":"string"},"BillingType":{"enum":["Automated","Manual","Consolidated"],"type":"string","description":"Represents the type of billing process."},"AccountRef":{"required":["name","status","type"],"type":"object","properties":{"id":{"type":"string"},"name":{"maxLength":500,"minLength":1,"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"type":{"allOf":[{"$ref":"#/components/schemas/AccountType"}]},"status":{"allOf":[{"$ref":"#/components/schemas/AccountStatus"}]}},"additionalProperties":false},"AccountType":{"enum":["Client","Vendor","Operations"],"type":"string"},"AccountStatus":{"enum":["Active","Enabled","Disabled"],"type":"string"},"LicenseeRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"externalId":{"type":"string","nullable":true}},"additionalProperties":false},"ProductRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"externalIds":{"allOf":[{"$ref":"#/components/schemas/ProductExternalIdBag"}]},"status":{"type":"string"}},"additionalProperties":false},"ProductExternalIdBag":{"type":"object","properties":{"operations":{"type":"string","nullable":true},"defaultErpItem":{"type":"string","nullable":true}},"additionalProperties":false},"InvoiceErpData":{"type":"object","properties":{"erpId":{"type":"string","description":"The ERP system identifier for the invoice.","nullable":true},"documentNo":{"type":"string","description":"The document number assigned by the ERP system."},"countryCode":{"type":"string","description":"The country code of the credit memo."},"documentDate":{"type":"string","description":"The date when the document was created.","format":"date-time","nullable":true},"dueDate":{"type":"string","description":"The due date for the invoice payment.","format":"date-time","nullable":true},"externalDocumentNo":{"type":"string","description":"The external document number associated with the invoice.","nullable":true},"externalDocumentNo2":{"type":"string","description":"The second external document number associated with the invoice.","nullable":true},"balanceDue":{"type":"number","description":"The remaining balance due on the invoice.","format":"double","nullable":true},"invoiceTotal":{"type":"number","description":"The total amount of the invoice.","format":"double","nullable":true},"postingDate":{"type":"string","description":"The date when the invoice was posted.","format":"date-time"},"revision":{"type":"integer","description":"The revision of the invoice, used for versioning control.","format":"int64","nullable":true},"rowVersion":{"type":"integer","description":"The row version of the invoice, used for concurrency control.","format":"int64","nullable":true},"yourReference":{"type":"string","description":"Can be the custom reference (free text) or the statement ID (fixed format).","nullable":true},"addresses":{"allOf":[{"$ref":"#/components/schemas/ErpAddressList"}],"description":"The list of addresses associated with the invoice."},"referenceNumber":{"allOf":[{"$ref":"#/components/schemas/ErpReferenceNumber"}],"description":"The additional identifiers related to the invoice.","nullable":true},"payment":{"allOf":[{"$ref":"#/components/schemas/ErpPayment"}],"description":"The payment data associated with the invoice.","nullable":true}},"additionalProperties":false,"description":"Represents ERP-specific data related to an invoice."},"ErpAddressList":{"type":"object","properties":{"billTo":{"allOf":[{"$ref":"#/components/schemas/ErpAddress"}],"description":"The bill to address."},"licenseTo":{"allOf":[{"$ref":"#/components/schemas/ErpAddress"}],"description":"The license to address.","nullable":true},"sellTo":{"allOf":[{"$ref":"#/components/schemas/ErpAddress"}],"description":"The sell to address.","nullable":true},"shipTo":{"allOf":[{"$ref":"#/components/schemas/ErpAddress"}],"description":"The ship to address.","nullable":true}},"additionalProperties":false,"description":"Represents a list of addresses for billing purposes."},"ErpAddress":{"type":"object","properties":{"name":{"type":"string","description":"The primary name associated with the address."},"name2":{"type":"string","description":"The secondary name associated with the address.","nullable":true},"email":{"type":"string","description":"The email associated with the address.","nullable":true},"customerNo":{"type":"string","description":"The customer number associated with the address.","nullable":true},"addressLine1":{"type":"string","description":"The first line of the address."},"addressLine2":{"type":"string","description":"The second line of the address.","nullable":true},"addressLine3":{"type":"string","description":"The third line of the address.","nullable":true},"city":{"type":"string","description":"The city of the address.","nullable":true},"postCode":{"type":"string","description":"The postal code of the address.","nullable":true},"county":{"type":"string","description":"The county/state/region of the address.","nullable":true},"country":{"type":"string","description":"The country of the address.","nullable":true},"contactName":{"type":"string","description":"The contact name associated with the address.","nullable":true},"contactNo":{"type":"string","description":"The contact number associated with the address.","nullable":true},"contactEmail":{"type":"string","description":"The contact email associated with the address.","nullable":true},"contactPhone":{"type":"string","description":"The contact phone number associated with the address.","nullable":true},"code":{"type":"string","description":"The code associated with the address.","nullable":true}},"additionalProperties":false,"description":"Represents an address with various details such as name, address lines, city, postcode, country, and contact name."},"ErpReferenceNumber":{"type":"object","properties":{"eInvoiceNo":{"type":"string","description":"The e-invoice number associated with the invoice.","nullable":true},"orderNo":{"type":"string","description":"The order number associated with the invoice. Also known as \"Sales Order ID\"."},"ppqNo":{"type":"string","description":"The PPQ number associated with the invoice.","nullable":true},"quoteNo":{"type":"string","description":"The quote number associated with the invoice.","nullable":true}},"additionalProperties":false,"description":"Represents reference numbers associated with an ERP system."},"ErpPayment":{"type":"object","properties":{"methodCode":{"type":"string","description":"Gets or sets the payment method code."},"termsCode":{"type":"string","description":"Gets or sets the payment terms code.","nullable":true}},"additionalProperties":false,"description":"Represents payment data for ERP systems."},"InvoicePrice":{"type":"object","properties":{"currency":{"type":"string","description":"The currency used for the invoice pricing."},"currencyFactor":{"type":"number","description":"The factor applied to the currency, used for conversion or adjustments.","format":"double","nullable":true},"currencyFactor2":{"type":"number","description":"The second factor applied to the currency, used for conversion or adjustments.","format":"double","nullable":true},"markup":{"type":"number","description":"The markup applied to the invoice, visible to operations.","format":"double","nullable":true},"margin":{"type":"number","description":"The margin applied to the invoice, visible to operations.","format":"double","nullable":true},"totalPP":{"type":"number","description":"The total purchase price, visible to operations.","format":"double","nullable":true},"totalSP":{"type":"number","description":"The total selling price, visible to clients or operations.","format":"double","nullable":true},"totalST":{"type":"number","description":"The total sales tax, visible to clients or operations.","format":"double","nullable":true},"totalGT":{"type":"number","description":"The total gross amount, visible to clients or operations.","format":"double","nullable":true}},"additionalProperties":false,"description":"Represents the pricing details of an invoice."},"InvoiceLine":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the invoice line."},"description":{"type":"string","description":"The primary description of the line item.","nullable":true},"description2":{"type":"string","description":"The secondary description of the line item, if any.","nullable":true},"documentNo":{"type":"string","description":"The document number associated with the invoice line."},"erpData":{"allOf":[{"$ref":"#/components/schemas/InvoiceLineErpData"}],"description":"The ERP-specific data related to the credit memo line.","nullable":true},"itemNo":{"type":"string","description":"The item number associated with the line item.","nullable":true},"lineNo":{"type":"integer","description":"The line number within the invoice.","format":"int32"},"period":{"allOf":[{"$ref":"#/components/schemas/DatePeriod"}],"description":"The period associated with the line item, if any.","nullable":true},"price":{"allOf":[{"$ref":"#/components/schemas/InvoiceLinePrice"}],"description":"The price details for the line.","nullable":true}},"additionalProperties":false,"description":"Represents a line item in an invoice."},"InvoiceLineErpData":{"type":"object","properties":{"contractNo":{"type":"string","description":"The contract number associated with the line.","nullable":true},"countryOfUsage":{"type":"string","description":"The country of usage for the line.","nullable":true},"dataOrigin":{"type":"integer","description":"The data origin for the line.","format":"int32","nullable":true},"externalPositionNo":{"type":"string","description":"The external position number for the line.","nullable":true},"navisionCountryCode":{"type":"string","description":"The Navision country code for the line.","nullable":true},"parentItemNo":{"type":"string","description":"The parent item number for the line.","nullable":true},"primary":{"allOf":[{"$ref":"#/components/schemas/ErpCode"}],"description":"The primary code details for the line, if any.","nullable":true},"secondary":{"allOf":[{"$ref":"#/components/schemas/ErpCode"}],"description":"The secondary code details for the line, if any.","nullable":true},"rowVersion":{"type":"integer","description":"The row version of the line item for concurrency control.","format":"int64","nullable":true},"responsibilityCenterCode":{"type":"string","description":"The responsibility center code for the line.","nullable":true},"swoPurchaseOrderNo":{"type":"string","description":"The SWO purchase order number for the line.","nullable":true},"type":{"type":"integer","description":"The type of the line.","format":"int32","nullable":true},"unitOfMeasure":{"type":"string","description":"The unit of measure for the line.","nullable":true},"varAgreementNo":{"type":"string","description":"The VAR agreement number for the line.","nullable":true},"varPartnerNo":{"type":"string","description":"The VAR partner number for the line.","nullable":true},"msrp":{"type":"number","description":"The manufacturer's suggested retail price (MSRP) for the line item.","format":"double"},"timestamp":{"type":"integer","description":"The timestamp of the line item for concurrency control.","format":"int64"},"sellToContactNo":{"type":"string","description":"The contact number for the sell-to party, if any.","nullable":true},"externalDocumentNo":{"type":"string","description":"The external document number associated with the line item.","nullable":true},"externalDocumentNo2":{"type":"string","description":"An additional external document number, if any.","nullable":true},"yourReference":{"type":"string","description":"The reference provided by the customer for the line item.","nullable":true}},"additionalProperties":false,"description":"Represents ERP-specific data related to a invoice line."},"ErpCode":{"type":"object","properties":{"identifier":{"type":"string","description":"The unique identifier for the ERP code."},"value":{"type":"string","description":"The value of the ERP code.","nullable":true},"version":{"type":"string","description":"The version of the ERP code.","nullable":true}},"additionalProperties":false,"description":"Represents ERP-specific data related to a credit memo line or invoice line."},"DatePeriod":{"type":"object","properties":{"start":{"type":"string","format":"date-time","nullable":true},"end":{"type":"string","format":"date-time","nullable":true}},"additionalProperties":false},"InvoiceLinePrice":{"type":"object","properties":{"amount":{"type":"number","description":"The net amount of the invoice line, visible to clients or operations.","format":"double"},"amountIncludingVat":{"type":"number","description":"The total amount including VAT, visible to clients or operations.","format":"double"},"discountAmount":{"type":"number","description":"The discount amount applied to the invoice line, visible to clients or operations.","format":"double"},"lineAmount":{"type":"number","description":"The total line amount after applying discounts, visible to clients or operations.","format":"double"},"purchaseCurrencyCode":{"type":"string","description":"The currency used for the purchase price, visible only to operations.","nullable":true},"purchaseCurrencyFactor":{"type":"number","description":"The factor applied to the purchase currency, visible only to operations.","format":"double","nullable":true},"purchasePrice":{"type":"number","description":"The purchase price, visible only to operations.","format":"double","nullable":true},"purchasePriceLcy":{"type":"number","description":"The purchase price in local currency, visible only to operations.","format":"double","nullable":true},"purchasePriceTotal":{"type":"number","description":"The total purchase price, visible only to operations.","format":"double","nullable":true},"purchasePriceTotalLcy":{"type":"number","description":"The total purchase price in local currency, visible only to operations.","format":"double","nullable":true},"quantity":{"type":"integer","description":"The quantity for the credit memo line.","format":"int32","nullable":true},"salesMarkup":{"type":"number","description":"The sales markup percentage for the invoice line, visible only to operations.","format":"double","nullable":true},"salesMargin":{"type":"number","description":"The sales margin percentage for the invoice line, visible only to operations.","format":"double","nullable":true},"unitPrice":{"type":"number","description":"The unit price for the credit memo line.","format":"double","nullable":true},"vatBaseAmount":{"type":"number","description":"The base amount used for VAT calculation.","format":"double"},"vatCalculationType":{"type":"integer","description":"The VAT calculation type for the line.","format":"int32","nullable":true},"vatPercent":{"type":"number","description":"The VAT percentage for the line.","format":"double","nullable":true}},"additionalProperties":false,"description":"Represents the price details of an invoice line."},"AnalyticsInfo":{"type":"object","properties":{"status":{"allOf":[{"$ref":"#/components/schemas/AnalyticsStatus"}],"description":"The current status of the analytics operation."}},"additionalProperties":false,"description":"Analytics insofmation."},"AnalyticsStatus":{"enum":["Pending","Running","Ready","Failed"],"type":"string","description":"Specifies the status of an analytics operation."},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.platform.softwareone.com/developer-resources/rest-api/billing-api/invoice/get-invoice.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
