Skip to content

Download a purchase order as a PDF

GET
/stores/{storeRef}/purchase-orders/{id}/pdf
curl --request GET \
--url 'https://apibase.ecomweb.app/api/v1/stores/example/purchase-orders/1/pdf?locale=vi' \
--header 'x-api-key: <x-api-key>'

Renders the purchase order as the PDF document a supplier receives, and returns it as a file attachment. Rendering is rate limited. Use locale to choose the document language.

Required scopes: read:purchase_orders

id
required
integer

The purchase order ID.

storeRef
required
string

The store’s ref, as returned by GET /stores.

locale
string
default: vi
Allowed values: vi en

Language of the document: vi or en. Any other value falls back to vi.

The PDF document, sent as an attachment.

Media typeapplication/pdf
string format: binary

The key is missing, invalid, revoked or expired.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The resource does not exist in this store.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

Too many requests; wait a little before retrying.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}