Invoices API
You can access invoices in a Uphance account using these API calls. You can retrieve all invoices or new invoices since a certain ID.
GET all invoices
Retrieve all orders. This endpoint will return 100 invoices at most (see the Pagination section to learn how to access all pages).
$ curl https://api.uphance.com/invoices \
-H "Authorization: ACCESS_TOKEN"
Example response:
{
"invoices": [
{
"id": 131066,
"created_at": "2019-08-01T20:43:25.000+01:00",
"updated_at": "2019-08-01T20:43:42.000+01:00",
"items_total": "400.0",
"items_tax": "200.0",
"subtotal": "400.0",
"total_tax": "200.0",
"grand_total": "600.0",
"total_quantity": 1,
"shipping_cost": "0.0",
"shipping_tax": "0.0",
"settlement_discount_percentage": "0.0",
"invoice_number": 6278,
"due_date": "2019-08-01",
"invoice_type": "normal",
"total_paid": "600.0",
"total_credited": "0.0",
"total_discounted": null,
"amount_outstanding": "0.0",
"channel_id": 10105,
"channel_name": "Wholesale EUR",
"currency": "EUR",
"tax_rate_name": "EU VAT",
"payment_terms": "Payment due in 30 days",
"order_number": "501",
"customer_name": "Clothing Ceremony",
"billing_address": {
"line_1": "Street 1",
"line_2": "",
"line_3": "",
"city": "Houston",
"state": "TX",
"country": "US",
"postcode": ""
},
"shipping_address": {
"line_1": "1117 Clothing Street",
"line_2": "",
"line_3": "",
"city": "Houston",
"state": "TX",
"country": "US",
"postcode": "77707"
},
"billing_contact": {
"first_name": "Bill",
"last_name": "Last",
"position": "",
"phone_1": "7322992099",
"phone_2": "",
"email": "[email protected]",
"notes": ""
},
"shipping_contact": {
"first_name": "Ship",
"last_name": "Last",
"position": "",
"phone_1": "",
"phone_2": "",
"email": "[email protected]",
"notes": "",
},
"organisation_id": 9579,
"company_id": 64512,
"payments_count": 1,
"sale_id": 117095,
"line_items": [
{
"id": 909137,
"product_id": 106908,
"product_name": "Bundle: Shirt & Pants",
"variation_id": 237637,
"color": "Pink",
"unit_tax": "200.0",
"tax_level": "50.0",
"unit_price": "400.0",
"original_price": "400.0",
"percentage_discount": "0.0",
"line_quantities": [
{
"id": 4697690,
"size": "S",
"quantity": 0,
"sku_id": 1276184
},
{
"id": 4697691,
"size": "M",
"quantity": 1,
"sku_id": 1276185
},
{
"id": 4697692,
"size": "M",
"quantity": 1,
"sku_id": 1276185
},
{
"id": 4697693,
"size": "L",
"quantity": 0,
"sku_id": 1276186
}
]
},
{
"id": 909138,
"product_id": 105719,
"product_name": "Bundle 1",
"variation_id": 235077,
"color": "Grey",
"unit_tax": "25.0",
"tax_level": "50.0",
"unit_price": "50.0",
"original_price": "50.0",
"percentage_discount": "0.0",
"line_quantities": [
{
"id": 4697694,
"size": "S",
"quantity": 0,
"sku_id": 1265400
},
{
"id": 4697695,
"size": "S",
"quantity": 0,
"sku_id": 1265400
},
{
"id": 4697696,
"size": "S",
"quantity": 0,
"sku_id": 1265400
},
{
"id": 4697697,
"size": "S",
"quantity": 0,
"sku_id": 1265400
},
{
"id": 4697698,
"size": "M",
"quantity": 0,
"sku_id": 1265402
},
{
"id": 4697699,
"size": "M",
"quantity": 0,
"sku_id": 1265402
},
{
"id": 4697700,
"size": "M",
"quantity": 0,
"sku_id": 1265402
},
{
"id": 4697701,
"size": "M",
"quantity": 0,
"sku_id": 1265402
},
{
"id": 4697702,
"size": "L",
"quantity": 0,
"sku_id": 1265404
},
{
"id": 4697703,
"size": "L",
"quantity": 0,
"sku_id": 1265404
},
{
"id": 4697704,
"size": "L",
"quantity": 0,
"sku_id": 1265404
},
{
"id": 4697705,
"size": "L",
"quantity": 0,
"sku_id": 1265404
}
]
}
]
}
],
"meta": {
"current_page": 1,
"next_page": null,
"prev_page": null,
"total_pages": 1,
"total_count": 1
}
}
GET all invoices since ID
Retrieve all invoices since a certain Invoice ID. This endpoint will return 100 invoices at most (see the Pagination section to learn how to access all pages).
$ curl https://api.uphance.com/invoices/since?since_id=[INVOICE_ID] \
-H "Authorization: ACCESS_TOKEN"