Skip to main content

Receipts (1.0.0)

Download OpenAPI specification:Download

Receipts API

A receipt is a financial document that is generated when a purchase or return is made in the store. The receipt is handed over to the customer right after the purchase or return.

NewStore generates three types of receipts, namely sales, return, and exchange receipts. An order can have a single sales or exchange receipt but might have multiple return receipts.

Use this API to:

  • View receipts for a specific order

  • View and download specific receipts in PDF format

Get list of receipts for the order

This endpoint returs only a list of receipts. To get the receipt, please use one of endpoints:

  • JSON version: /orders/{order_id}/receipts/{receipt_id}

  • PDF version: /orders/{order_id}/receipts/{receipt_id}.pdf

Authorizations:
newStoreAccessToken
path Parameters
order_id
required
string = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Order ID (UUID)

query Parameters
type
string
Enum: "sales" "exchange" "return"

The type of receipts to return - sales, exchange or return receipts

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get receipt by id

Authorizations:
newStoreAccessToken
path Parameters
order_id
required
string = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Order ID (UUID)

receipt_id
required
string = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Receipt ID (UUID)

Responses

Response samples

Content type
application/json
{
  • "id": "a7c9f0f6-6eb9-4492-901b-b5cc8beb07b8",
  • "type": "return",
  • "date": "2006-01-02T15:04:05Z",
}

Display PDF format of receipt by ID

Display expected PDF file for the receipt. Internally implemented requirement about copy-receipt.

Authorizations:
newStoreAccessToken
path Parameters
order_id
required
string = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Order ID (UUID)

receipt_id
required
string = 36 characters ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Receipt ID (UUID)

Responses

Response samples

Content type
application/json
{
  • "error_code": "invalid_uuid",
  • "message": "invalid order id"
}