API - Purchase Invoices
This is a fork of page 30042 "APIV2 - Purchase Invoices" from version 27.0.38460.40573. Added support for Extra Values.
Object Definition
| Object Type | Page |
| Object ID | 70314188 |
| Object Name | QWESR API - Purchase Invoices |
| Source Table | Purch. Inv. Entity Aggregate |
API Definition
| APIPublisher | smartApps |
| APIGroup | spider |
| APIVersion | v1.0 |
| EntitySetName | purchaseInvoices |
| EntityName | purchaseInvoice |
Service Enabled Procedures
| Name | Description |
|---|---|
| Post(WebServiceActionContext) | Posts the current Purchase Invoice. |
| Release(WebServiceActionContext) | Releases the current Purchase Invoice. |
| Reopen(WebServiceActionContext) | Reopens the current Purchase Invoice. |
Events
Example
Read
Get a list of Purchase Invoices.
GET businesscentralPrefix/companies({id})/purchaseInvoices?$schemaversion=2.0
Get a single Purchase Invoice and it's lines.
GET businesscentralPrefix/companies({id})/purchaseInvoices({id})?$expand=purchaseInvoiceLines&$schemaversion=2.0
Create
Create a new Purchase Invoice and a Purchase Invoice Line.
POST businesscentralPrefix/companies({id})/purchaseInvoices?$expand=purchaseInvoiceLines&$schemaversion=2.0
Content-type: application/json
{
"vendorNumber": "10000",
"purchaseInvoiceLines": [
{
"lineType": "Item",
"lineObjectNumber": "1896-S",
"quantity": 5
}
]
}
Controls
| Type | Name | Data Type | Read-only |
|---|---|---|---|
| Field | id | Yes | |
| Field | number | Yes | |
| Field | postingDate | ||
| Field | invoiceDate | ||
| Field | dueDate | ||
| Field | vendorInvoiceNumber | ||
| Field | vendorId | ||
| Field | vendorNumber | ||
| Field | vendorName | Yes | |
| Field | payToName | Yes | |
| Field | payToContact | Yes | |
| Field | payToVendorId | ||
| Field | payToVendorNumber | ||
| Field | shipToName | ||
| Field | shipToContact | ||
| Field | buyFromAddressLine1 | ||
| Field | buyFromAddressLine2 | ||
| Field | buyFromCity | ||
| Field | buyFromCountry | ||
| Field | buyFromState | ||
| Field | buyFromPostCode | ||
| Field | shipToAddressLine1 | ||
| Field | shipToAddressLine2 | ||
| Field | shipToCity | ||
| Field | shipToCountry | ||
| Field | shipToState | ||
| Field | shipToPostCode | ||
| Field | payToAddressLine1 | Yes | |
| Field | payToAddressLine2 | Yes | |
| Field | payToCity | Yes | |
| Field | payToCountry | Yes | |
| Field | payToState | Yes | |
| Field | payToPostCode | Yes | |
| Field | shortcutDimension1Code | ||
| Field | shortcutDimension2Code | ||
| Field | currencyId | ||
| Field | currencyCode | Text | |
| Field | orderId | Yes | |
| Field | orderNumber | Yes | |
| Field | purchaser | ||
| Field | pricesIncludeTax | ||
| Sub page | dimensionSetLines | ||
| Sub page | purchaseInvoiceLines | ||
| Sub page | pdfDocument | Yes | |
| Field | discountAmount | ||
| Field | discountAppliedBeforeTax | Yes | |
| Field | totalAmountExcludingTax | Yes | |
| Field | totalTaxAmount | Yes | |
| Field | totalAmountIncludingTax | ||
| Field | status | Yes | |
| Field | lastModifiedDateTime | ||
| Field | extraValue1 | Text | |
| Field | extraValue2 | Text | |
| Field | extraValue3 | Text | |
| Field | extraValue4 | Text | |
| Field | extraValue5 | Text | |
| Field | extraValue6 | Text | |
| Field | extraValue7 | Text | |
| Field | extraValue8 | Text | |
| Field | extraValue9 | Text | |
| Field | extraValue10 | Text | |
| Sub page | attachments | ||
| Sub page | documentAttachments |
This documentation is generated from Spider v27.4