Invoices

Invoices group Payouts together. When a Payout is created it is added to the Invoice that is currently open. If there is not an open Invoice, a new, open, Invoice is created.

The Invoice object

Attribute

Description

id

A unique identifier for the object.

amount

Denotes whether the Invoice is the one currently open.

amount

Decimal formatted string for the total amount.

currency

ISO-4217 currency code.

ocr_number

Bank reference.

pdf

Link to where a pdf version of the Invoice can be downloaded.

metadata

JSON-encoded metadata.

created_at

Time at which the Invoice was created. Displayed as ISO 8601 string.

paid_at

Time at which the Invoice was paid. Displayed as ISO 8601 string.

get
List Invoices

https://api.gigapay.se/v2/invoices/
Endpoint for listing Invoices. The Invoices are returned sorted by creation date, with the most recently created Invoice appearing first.
Request
Response
Request
Headers
Authentication
required
string
Authentication token.
Integration-ID
required
string
Integration ID.
Query Parameters
page
optional
string
Which page to retrieve.
page_size
optional
string
The number of Invoices per page.
Response
200: OK
Invoices successfully listed.
{
"count": 4,
"next": null,
"previous": "https://api.gigapay.se/v2/payouts/?page=1",
"results": [
{
"id": "bab4b830-47d6-4a24-a460-3289897f6e8e",
"open": false,
"amount": "17293.90",
"currency": "SEK",
"ocr_number": "22558",
"pdf": "https://api.gigapay.se/v2/invoices/bab4b830-47d6-4a24-a460-3289897f6e8e/pdf/?token=Ii92Mi9pbnZvaWNlcy9iYTFiNGY1MS0wZTkzLTQyYTktYjg2NS1kNTAzOTFmNDEzNDMvcGRmLyI:1j97Xf:1eSC6gxbuVrtuKK_yqCox8ELycQ",
"metadata": {},
"created_at": "2020-05-22T10:36:27.254857Z",
"paid_at": "2019-05-22T10:38:19.874623Z"
},
{
"id": "c1554d88-b74f-4d6a-bfa6-049c14905dc7",
"open": false,
"amount": "1149.48",
"currency": "SEK",
"ocr_number": "22350",
"pdf": "https://api.gigapay.se/v2/invoices/c1554d88-b74f-4d6a-bfa6-049c14905dc7/pdf/?token=Ii92Mi9pbnZvaWNlcy82ZGRmNzY5Yi0yZTQzLTQ4Y2UtOTg0Yy01OTYzZmNmNjBhMDQvcGRmLyI:1j97Xf:-WLR9sw4-PIJNMV1CSETeujfJr4",
"metadata": {},
"created_at": "2019-05-23T11:45:49.847264Z",
"paid_at": "2019-05-23T11:46:28.2321742Z"
},
]
}

get
Retrieve an Invoices

https://api.gigapay.se/v2/invoices/:id/
Endpoint for retrieving a specific Invoice.
Request
Response
Request
Path Parameters
id
required
string
The identifier of the Invoice to be retrieved. It is possible to use the identifier open to retrieve the currently open Invoice.
Headers
Authentication
required
string
Authentication Token.
Integration-ID
required
string
Integration ID.
Response
200: OK
Invoice successfully retrieved.
{
"id": "bab4b830-47d6-4a24-a460-3289897f6e8e",
"open": false,
"amount": "17293.90",
"currency": "SEK",
"ocr_number": "22558",
"pdf": "https://api.gigapay.se/v2/invoices/bab4b830-47d6-4a24-a460-3289897f6e8e/pdf/?token=Ii92Mi9pbnZvaWNlcy9iYTFiNGY1MS0wZTkzLTQyYTktYjg2NS1kNTAzOTFmNDEzNDMvcGRmLyI:1j97Xf:1eSC6gxbuVrtuKK_yqCox8ELycQ",
"metadata": {},
"created_at": "2020-05-22T10:36:27.254857Z",
"paid_at": "2019-05-22T10:38:19.874623Z"
}

patch
Update an Invoice

https://api.gigapay.se/v2/invoices/:id/
Endpoint for updating a specific Invoice.
Request
Response
Request
Path Parameters
id
required
string
Identifier of the invoice to be retrieved.
Headers
Authentication
required
string
Authentication token.
Integration-ID
required
string
Integration-ID.
Body Parameters
id
optional
string
A new unique identifier for the object. If one is not provided, the previous value be retained.
metadata
optional
object
JSON-encoded metadata. If one is not provided, the previous be retained.
Response
200: OK
Invoice successfully updated.
{
"id": "bab4b830-47d6-4a24-a460-3289897f6e8e",
"open": false,
"amount": "17293.90",
"currency": "SEK",
"ocr_number": "22558",
"pdf": "https://api.gigapay.se/v2/invoices/bab4b830-47d6-4a24-a460-3289897f6e8e/pdf/?token=Ii92Mi9pbnZvaWNlcy9iYTFiNGY1MS0wZTkzLTQyYTktYjg2NS1kNTAzOTFmNDEzNDMvcGRmLyI:1j97Xf:1eSC6gxbuVrtuKK_yqCox8ELycQ",
"metadata": {
"reference": "2020-05-22"
},
"created_at": "2020-05-22T10:36:27.254857Z",
"paid_at": "2020-05-22T10:38:19.874623Z"
}

‚Äč