Purchase Orders
The PurchaseOrder Object
A Rutter Purchase Order represents a commercial document issued by a vendor to a customer, indicating the types, quantities, and agreed prices for products or services that the customer wishes to purchase. It serves as a formal offer to buy goods or services from a vendor.
Properties
id
stringRequiredThe Rutter generated unique ID of the purchase order.
platform_id
stringRequiredThe platform specific ID of the purchase order.
subsidiary_id
stringnullableRequiredThe Rutter ID of the Subsidiary linked to the purchase order. This feature is currently only supported on NetSuite.
vendor_id
stringnullableRequiredThe Rutter ID of the Vendor linked to the purchase order.
issue_date
stringRequiredThe ISO 8601 timestamp for the issue date of the purchase order.
status
enumRequiredThe status of the purchase order.
currency_code
enumnullableRequiredThe ISO 4217 currency code of the purchase order.
document_number
stringnullableRequiredThe buyer facing document number of the purchase order.
memo
stringnullableRequiredThe memo of the purchase order.
total_amount
numbernullableRequiredThe total payment amount of the purchase order.
total_quantity
numbernullableRequiredThe total quantity of items in the purchase order.
line_items
arrayRequiredAn array of line items associated with the purchase order.
line_items
attributescreated_at
stringnullableRequiredThe ISO 8601 timestamp that the purchase order was created.
updated_at
stringnullableRequiredThe ISO 8601 timestamp that the purchase order was last updated.
last_synced_at
stringRequiredThe ISO 8601 timestamp when the purchase order was last synced by Rutter.
platform_data
objectThe raw platform data corresponding to the Rutter object.
List Purchase Orders
Request Parameters
access_token
stringqueryRequiredThe access token of the connection.
cursor
stringqueryThe cursor to use for pagination. This value is passed in from next_cursor
field in a previous request.
expand
enumqueryUsed to request inclusion of optional objects.
force_fetch
enumqueryForce a response even if the underlying connection hasn't finished the initial sync.
last_synced_at_min
integerqueryUnix Timestamp in milliseconds representing the minimum last_synced_at datetime to fetch entities from.
limit
integerqueryThe limit on the number of entities returned.
sort
stringqueryThe field and direction to sort by (ASC
or DESC
), e.g. last_synced_at ASC
. Currently supports the fields: updated_at
, last_synced_at
. If a field is provided but ASC
or DESC
is not, defaults to ASC
. If this field is omitted, defaults, to updated_at DESC
.
updated_at_max
integerqueryUnix Timestamp in milliseconds representing the maximum updated_at datetime to fetch entities from.
updated_at_min
integerqueryUnix Timestamp in milliseconds representing the minimum updated_at datetime to fetch entities from.
Response Body
connection
objectRequiredconnection
attributespurchase_orders
arrayRequiredpurchase_orders
attributesnext_cursor
stringnullable- Netsuite
- Quickbooks
- Xero
1{
2 "connection": {
3 "id": "00000000-0000-0000-0000-000000000000",
4 "orgId": "00000000-0000-0000-0000-000000000000",
5 "platform": "NETSUITE"
6 },
7 "purchase_orders": [
8 {
9 "id": "00000000-0000-0000-0000-000000000000",
10 "platform_id": "12345678",
11 "subsidiary_id": "00000000-0000-0000-0000-000000000000",
12 "vendor_id": "00000000-0000-0000-0000-000000000000",
13 "issue_date": "2023-01-02T02:34:56.000Z",
14 "status": "open",
15 "currency_code": "USD",
16 "document_number": "VENDPO-1",
17 "memo": "Example purchase order top-level memo",
18 "total_amount": 12.34,
19 "total_quantity": 1,
20 "line_items": [
21 {
22 "account_id": "00000000-0000-0000-0000-000000000000",
23 "class_id": "00000000-0000-0000-0000-000000000000",
24 "department_id": "00000000-0000-0000-0000-000000000000",
25 "tax_rate_id": "00000000-0000-0000-0000-000000000000",
26 "description": "Example description",
27 "total_amount": 12.34,
28 "item": {
29 "id": "00000000-0000-0000-0000-000000000000",
30 "quantity": 1,
31 "unit_amount": 12.34
32 }
33 }
34 ],
35 "created_at": "2023-01-02T02:34:56.000Z",
36 "updated_at": "2023-01-02T02:34:56.000Z",
37 "last_synced_at": "2023-01-02T02:34:56.000Z",
38 "platform_data": {
39 "id": 123,
40 "data": "Varies by platform"
41 }
42 }
43 ],
44 "next_cursor": "MTY3NDgzMTk0Ml82MDY4ZDI0ZC02NGRmLTRmN2EtYTM0Ny0zN2ZmNjY5MGVmMjU="
45}
Fetch a Purchase Order
Request Parameters
access_token
stringqueryRequiredThe access token of the connection.
force_fetch
enumqueryForce a response even if the underlying connection hasn't finished the initial sync.
Response Body
connection
objectRequiredconnection
attributespurchase_order
objectRequiredpurchase_order
attributes- Netsuite
- Quickbooks
- Xero
1{
2 "connection": {
3 "id": "00000000-0000-0000-0000-000000000000",
4 "orgId": "00000000-0000-0000-0000-000000000000",
5 "platform": "NETSUITE"
6 },
7 "purchase_order": {
8 "id": "00000000-0000-0000-0000-000000000000",
9 "platform_id": "12345678",
10 "subsidiary_id": "00000000-0000-0000-0000-000000000000",
11 "vendor_id": "00000000-0000-0000-0000-000000000000",
12 "issue_date": "2023-01-02T02:34:56.000Z",
13 "status": "open",
14 "currency_code": "USD",
15 "document_number": "VENDPO-1",
16 "memo": "Example purchase order top-level memo",
17 "total_amount": 12.34,
18 "total_quantity": 1,
19 "line_items": [
20 {
21 "account_id": "00000000-0000-0000-0000-000000000000",
22 "class_id": "00000000-0000-0000-0000-000000000000",
23 "department_id": "00000000-0000-0000-0000-000000000000",
24 "tax_rate_id": "00000000-0000-0000-0000-000000000000",
25 "description": "Example description",
26 "total_amount": 12.34,
27 "item": {
28 "id": "00000000-0000-0000-0000-000000000000",
29 "quantity": 1,
30 "unit_amount": 12.34
31 }
32 }
33 ],
34 "created_at": "2023-01-02T02:34:56.000Z",
35 "updated_at": "2023-01-02T02:34:56.000Z",
36 "last_synced_at": "2023-01-02T02:34:56.000Z",
37 "platform_data": {
38 "id": 123,
39 "data": "Varies by platform"
40 }
41 }
42}
Create a Purchase Order
Request Parameters
access_token
stringqueryRequiredThe access token of the connection.
Request Body
purchase_order
objectRequiredpurchase_order
attributesResponse Body
Any of:
purchase_order
objectRequiredpurchase_order
attributesasync_response
objectasync_response
attributeserrors
arrayerrors
attributes- Netsuite
1{
2 "purchase_order": {
3 "vendor_id": "00000000-0000-0000-0000-000000000000",
4 "currency": "USD",
5 "line_items": [
6 {
7 "item": "00000000-0000-0000-0000-000000000000",
8 "quantity": 1,
9 "description": "Example description",
10 "unit_amount": 10
11 }
12 ]
13 }
14}
1{
2 "purchase_order": {
3 "id": "00000000-0000-0000-0000-000000000000",
4 "platform_id": "12345678",
5 "subsidiary_id": "00000000-0000-0000-0000-000000000000",
6 "vendor_id": "00000000-0000-0000-0000-000000000000",
7 "posted_date": "2023-01-02T02:34:56.000Z",
8 "currency_code": "USD",
9 "document_number": "VENDPO-1",
10 "memo": "For a Rutter shirt.",
11 "status": "active",
12 "vendor_name": "Rutter API",
13 "total_amount": "12.34",
14 "total_quantity": "1",
15 "line_items": [
16 {
17 "platform_id": "12345678",
18 "account_id": "00000000-0000-0000-0000-000000000000",
19 "class_id": "00000000-0000-0000-0000-000000000000",
20 "item_id": "00000000-0000-0000-0000-000000000000",
21 "tax_rate_id": "00000000-0000-0000-0000-000000000000",
22 "description": "Example description",
23 "item_name": "Rutter shirt",
24 "amount": "12.34",
25 "amount_billed": "12.34",
26 "amount_received": "12.34",
27 "quantity": "1",
28 "quantity_bill": "1",
29 "quantity_received": "1",
30 "unit_amount": "12.34"
31 }
32 ],
33 "created_at": "2023-01-02T02:34:56.000Z",
34 "updated_at": "2023-01-02T02:34:56.000Z",
35 "last_synced_at": "2023-01-02T02:34:56.000Z",
36 "platform_data": {
37 "id": 123,
38 "data": "Varies by platform"
39 }
40 }
41}
Have questions?
Contact support for personalized guidance.