At the end of each month we will invoice you for all the stock that we have shipped on your purchase orders. You can use this service to get a copy of your invoices.
| NextToken |
Required. Every invoice in our database has an ID.
This ID is a sequential number that is incremented every time a new invoice record is added. We call them "tokens".
So, this is how it works: You have to send us the token of the last invoice that you have received,
and we will look up all the new invoices that we have created (since that token).
For example, let's say that the token of the last invoice that you received is 82. At the end of the month, we create 3 new invoices: 83, 84 and 85. The next time you request this service (using token 82), we will return the invoice records for 83, 84 and 85. We will also give you a new token, 85, which you have to remember because you have to use this token the next time you request this service. |
{
"NextToken": "85",
"Invoices": [
{
"InvoiceID": "IN00067017",
"PO": "098339215",
"OrderDate": "2016-03-28T09:54:00Z",
"InvoiceDate": "2016-05-31T16:05:00Z",
"Type": "I",
"PaymTerms": "D30",
"PaymTermsDesc": "Net 30 Days",
"Cur", "USD",
"Freight": 0.00,
"Misc": 0.00,
"Tax": 0.00,
"Total": 998.40,
"Lines": [
{
"PO": "098339215",
"LN": "1",
"PN": "SK5482-01",
"Desc": "Headset for a mobile phone",
"UPC": "852067005340",
"Warehouse": "GP",
"LotID": "LOT04518913",
"InternalLN": 1,
"InternalPN": "SK5482-01",
"UOM": "EA",
"Qty": 200,
"UnitPrice": 6.75,
"Cur": "USD",
"TaxAmount": 0.00,
"TotalAmount": 1350.00
}
],
"ShipRef": [
{
"ReceiptID": "DN00073007",
"Ref": "098339215-01"
}
],
"TaxGroups": [
{
"Group": "ROW",
"Desc": "Rest of the World",
"Code": "P9",
"Value": 0,
"Exempt": false,
"ExemptCode": ""
}
],
"Buyer" {
"Name": "John's Distribution Centre",
"AltName": "",
"Code": "",
"VatNumber": "",
"Addresses": [
{
"Name": "John's Distribution Centre",
"AddressLine1": "215 East Taft Road",
"AddressLine2": "",
"City": "North Syracuse",
"County": "",
"State": "NY",
"PostalCode": "13212",
"Country": "US",
"Contacts": [
{
"Phone": "315 437 7617",
"Name": "John Doe",
"Fax": "",
"Email": "john@gmail.com",
"Language": "en-US"
}
]
}
]
}
"Seller": {
Same as Buyer
},
"ShipTo": {
Same as Buyer
}
}
]
}
| NextToken | We will always return the next token to you in the response. You have to store it, because you have to use this token the next time you request this service. |
| Invoices |
This is the list of invoices. If there were no new invoices since your last request,
then the invoices array will be empty, for example:
JSON: "Invoices": [] XML: <Invoices></Invoices> |
| InvoiceID | This is the number of the invoice in the PCH ERP system. |
| PO | This is your purchase order number. |
| OrderDate | This is the date when PCH received your purchase order. It is in Coordinated Universal Time (UTC), as indicated by the "Z" at the end: 2016-03-28T09:54:00Z |
| InvoiceDate | This is the date when PCH created the invoice. It is in Coordinated Universal Time (UTC), as indicated by the "Z" at the end: 2016-05-31T16:05:00Z |
| Type |
Type can have 2 values:
|
| PaymTerms | This is the code of the payment terms for this invoice, for example, "D30" for "Net 30 Days". |
| PaymTermsDesc | This is the description of the payment terms for this invoice. |
| Cur | This is the currency of your invoice. We use the ISO 4217 alphanumeric currency code, e.g. "USD" for United States Dollar. |
| The next 4 fields are for the amounts on your invoice. | |
| Freight | This is the total charge for freight (shipping). |
| Misc | This is for miscellaneous charges. |
| Tax | This is the total tax. |
| Total | This is the total amount for this invoice. |
This is the list of items that we are invoicing you for.
| PO | This is your purchase order number. |
| LN | This is the line number on your purchase order. |
| PN | This is the part number on the purchase order line. |
| Desc | This is the description of the part. |
| UPC | This is the UPC of the part. |
| Warehouse | This is the code of the warehouse where the part was shipped from. |
| LotID | This is the warehouse lot ID of this part. |
| InternalLN | This is the line number of the invoice in PCH's ERP system. In most cases this line number will be different from the line number on your purchase order. We might ask you to quote this line number when you have queries about your invoice. |
| InternalPN | This is the part number in PCH's ERP system. In most cases this will be the same as the part number on your purchase order. |
| UOM | This is the unit of measure, and is always expressed as "EA", meaning "each". |
| Qty | This is the number of parts that we are invoicing you for. |
| UnitPrice | This is the price for a single part. |
| Cur | This is the currency that is used for the unit price. We use the ISO 4217 alphanumeric currency code, e.g. "USD" for United States Dollar. |
| TaxAmount | This is the amount for tax on this line. |
| TotalAmount | This is the total amount for this line. |
This section contains the reference numbers of all the shipments related to this invoice.
| ReceiptID | This is the ID in PCH's ERP system of the shipment. |
| Ref | This is your reference number for the shipment. |
This sections contains a breakdown of the taxes paid on this invoice.
| Group | This is the code of the tax group, for example, "ROW" for "Rest of the World". |
| Desc | This is a description of the tax group. |
| Code | This is the tax code. |
| Value | This is the amount of tax. |
| Exempt | This is a true/false value to indicate if this item is exempt from tax. |
| ExemptCode | If exempt from tax, then this field will contain the exempt code. |
These 3 sections contain information about the buyer, seller and ship to parties.
| Name | This is the name of the party. |
| AltName | This is an alternative name for the party. |
| Code | This is the code of this party in PCH's ERP system. |
| VatNumber | If this party is registered in a country that uses VAT, then this will be the VAT number. |
|
The next sections contains the address and contact details of the party.
Addresses |
|
| Name | The name of the party at this address. |
| AddressLine1 | The first line of the address. This is usually the street number and name. |
| AddressLine2 | This is a second live for the street details. |
| City | This is the name of the city. |
| County | This is the name of the county. |
| State | This is the state abbreviation. For US addresses, this field is the 2-letter US state code (not the state name). |
| PostalCode | Zip or postal code. |
| Country | This is the country code (not the country name). We use the ISO 3166 2-letter code, e.g. "US" for United States of America. |
|
Contacts |
|
| Name | The name of the contact person. |
| Phone | This is the telephone number. |
| Fax | This is the fax number. |
| This is the e-mail address. | |
| Language | This is the language preference of this contact person, for example, "en-US". |