GET /sales/buy-orders

List all Buy Orders

This endpoint allows you to list all Buy Orders.

Operation ID: getBuyOrders
lock This endpoint requires a Bearer token in the Authorization header.

Responses

data array<object>
id string read-only

ID of the Buy Order.

type string read-only

Model type

buy_order
attributes object
entity_id integer read-only
type string read-only

Type of Buy Order.

MATERIAL SERVICE
base_total string | null read-only

The total base price of the Buy Order (including discount).

code string read-only

Code of the Buy Order.

completed_at string | null read-only

Date Buy Order is Received (state transition to 'RECEIVED').

Example: 2021-07-21 18:38:00

completed_by integer | null read-only

ID of the user who Received the Buy Order (state transition to 'RECEIVED').

created_by integer | null read-only

ID of the user who created the Buy Order

date_created string | null read-only

Date Buy Order is Created.

Example: 2021-07-21 18:38:00

date_updated string read-only

Date Buy Order was last updated.

Example: 2021-07-21 18:38:00

delivery_address string | null

Delivery Address of the Buy Order.

discount_total string | null read-only

The total discount of the Buy Order.

external_buy_id string | null

External ID of the Buy Order.

internal_buy_id string | null

Internal ID of the Buy Order.

observation string | null

Observations or notes of the Buy Order.

order_id integer read-only

ID of the Buy Order.

processed_at string | null read-only

Date Buy Order is started (state transition to 'CREATED').

Example: 2021-07-21 18:38:00

processed_by integer | null read-only

ID of the user who started the Buy Order (state transition to 'CREATED').

related_to_id integer | null

ID of the object (failure or scheduled work) related to the Buy Order (required with field related_to_type).

related_to_type string | null

Type of object related to the Buy Order (required with field related_to_id).

FAILURE SCHEDULED_WORK
state string

State of the Buy Order.

SAVED_AS_DRAFT CREATED RECEIVED_PARTIALLY RECEIVED CONFIRMED

Example: SAVED_AS_DRAFT

supplier_id integer | null

ID of the Supplier associated to the Buy Order. Required for type 'SERVICE' and state is not 'SAVED_AS_DRAFT'.

total_price number read-only

The total price of the Sell Order (including VAT and discount)

vat_total string | null read-only

The total VAT of the Buy Order.

warehouse_id integer | null

ID of the Warehouse associated to the Buy Order. Required for type 'MATERIAL' and state is not 'SAVED_AS_DRAFT'.

meta object
custom_fields object | null
included array<object>

List of relationships to be included

meta object

Meta model structure details

pagination object
total integer required

Total items.

Example: 1

count integer required

Total items returned for the current page.

Example: 1

per_page integer required

Maximum number of records per page.

Example: 1

current_page integer required

Number of the current page.

total_pages integer required

Number of the total pages.

links object

Requests that return multiple items include a `links` attribute, with links related to request's context.

self string required read-only

Current response link.

Example: /path?page=1

first string required read-only

Link to the first page result.

Example: /path?page=1

last string required read-only

Link to the previous page result.

Example: /path?page=1

next string read-only

Link to the next page result.

Example: /path?page=1

status string
error
error object
http_code integer
401
message string

Example: Authentication token invalid.

more_info string
status string
error
error object
http_code integer
403
message string

Example: Action unauthorized

more_info string
status string
error
error object
http_code integer
429
message string

Example: Too Many Requests.

more_info string
status string
error
error object
http_code integer
500
message string

Example: An error has occurred during the request.

more_info string