Invoices
Get All Invoices
This endpoint retrieves all invoices associated to current user.
HTTP Request
GET /v1/invoices
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | The current page |
count | 30 | The number of items per page |
Example
- Request
- Response
$ curl --request GET --url 'https://app.winesitting.com/v1/invoices' \
--header 'AccessKey: YourAccessKey' \
--header 'SecretKey: YourSecretKey' \
--header 'content-type: application/json'
[
{
"id": 19409,
"state": 0,
"validated_at": null,
"invoice_lines": [],
"address": {
"id": 123,
"name": null,
"firstname": null,
"lastname": null,
"company": null,
"street1": null,
"street2": null,
"city": null,
"zipcode": null,
"country": null,
"phone": null
},
"company_invoicing": "WineSitting",
"purchase_order": "PO-456",
"payment_mode": "sdd",
"created_at": "2023-07-17T11:54:40+02:00",
"updated_at": "2023-07-17T11:54:40+02:00",
"subTotal": 0,
"vat": 0,
"total": 0
},
{
"id": 28,
"state": 2,
"validated_at": "2018-06-06T00:00:00+02:00",
"invoice_lines": [
{
"id": 60,
"quantity": 185,
"price": 0.16,
"product": {
"id": 13,
"name": "Stockage de 1 à 240 bouteilles"
}
}
],
"address": {
"id": 100644,
"name": "Maison",
"firstname": "Dupont",
"lastname": "Dupond",
"company": "Société XXX",
"street1": "14 rue des Mésanges",
"street2": null,
"city": "Paris",
"zipcode": "75005",
"country": "FR",
"phone": "02 34 56 78 91",
"email": null,
"detail": null
},
"company_invoicing": "WineSitting",
"purchase_order": "PO-123456",
"payment_mode": "sdd",
"created_at": "2017-10-23T15:08:57+02:00",
"updated_at": "2018-06-06T16:57:53+02:00",
"subTotal": 29.6,
"vat": 5.9,
"total": 35.52
},
{
"id": 9,
"state": 1,
"validated_at": null,
"invoice_lines": [
{
"id": 32,
"quantity": 1,
"product": {
"id": 21,
"name": "Frais sortie préparation express"
}
},
{
"id": 33,
"quantity": 1,
"product": {
"id": 25,
"name": "Carton d'expédition 6 bouteilles"
}
},
{
"id": 34,
"label": "Produit libre",
"quantity": 6,
"price": 3
},
{
"id": 35,
"quantity": 185,
"product": {
"id": 13,
"name": "Stockage de 1 à 240 bouteilles"
}
}
],
"address": {
"id": 100644,
"name": "Maison",
"firstname": "Dupont",
"lastname": "Dupond",
"company": "Société XXX",
"street1": "14 rue des Mésanges",
"street2": null,
"city": "Paris",
"zipcode": "75005",
"country": "FR",
"phone": "02 34 56 78 91",
"email": null,
"detail": null
},
"company_invoicing": "WineSitting Primeurs",
"purchase_order": null,
"payment_mode": "sdd",
"created_at": "2017-06-22T17:56:41+02:00",
"updated_at": "2017-06-22T17:59:11+02:00",
"subTotal": 56.5,
"vat": 11.3,
"total": 67.8
}
]
Get a Specific Invoice
This endpoint retrieves a specific Invoice.
HTTP Request
GET /v1/invoices/{id}
URL Parameters
Parameter | Description |
---|---|
id | The id of the Invoice to retrieve |
info
You can't get an invoice that you don't own.
Example
- Request
- Response
$ curl --request GET --url 'https://app.winesitting.com/v1/invoices/28' \
--header 'AccessKey: YourAccessKey' \
--header 'SecretKey: YourSecretKey' \
--header 'content-type: application/json'
{
"id": 28,
"state": 2,
"validated_at": "2018-06-06T00:00:00+02:00",
"invoice_lines": [
{
"id": 60,
"quantity": 185,
"price": 0.16,
"product": {
"id": 13,
"name": "Stockage de 1 à 240 bouteilles"
}
}
],
"address": {
"id": 100644,
"name": "Maison",
"firstname": "Dupont",
"lastname": "Dupond",
"company": "Société XXX",
"street1": "14 rue des Mésanges",
"street2": null,
"city": "Paris",
"zipcode": "75005",
"country": "FR",
"phone": "02 34 56 78 91",
"email": null,
"detail": null
},
"company_invoicing": "WineSitting",
"purchase_order": "PO-123456",
"payment_mode": "sdd",
"created_at": "2017-10-23T15:08:57+02:00",
"updated_at": "2018-06-06T16:57:53+02:00",
"subTotal": 29.6,
"vat": 5.9,
"total": 35.52
}