curl --request POST \
--url https://api.rootfi.dev/accounting/sales_orders/all \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '{
"take": 10,
"skip": 0,
"orderBy": {
"total_amount": "asc"
},
"filter": {
"status": {
"eq": "SUBMITTED"
}
}
}'
{
"data": {
"data": [
{
"rootfi_id": 137160,
"rootfi_company_id": 1760,
"rootfi_organisation_id": 1,
"rootfi_integration_type": "QUICKBOOKS_SANDBOX",
"rootfi_updated_at": "2023-10-26T16:14:59.673Z",
"rootfi_created_at": "2023-10-26T16:14:59.685Z",
"platform_id": "1234567890123456789",
"contact_id": "1234567890123456789",
"invoice_ids": [
"3770712000000000099"
],
"currency_id": null,
"document_number": "A-1011",
"posted_date": "2023-01-17T00:00:00.000Z",
"delivery_date": null,
"description": null,
"currency_rate": 1,
"status": "SUBMITTED",
"total_amount": 78.75,
"sub_total": 87.5,
"tax_amount": 0,
"total_discount": 8.75,
"updated_at": "2023-01-17T00:00:00.000Z",
"currency": {
"data": {
"platform_id": null,
"name": null,
"code": null,
"symbol": null,
"is_base_currency": null,
"exchange_rate": null,
"updated_at": null
}
},
"addresses": {
"data": [
{
"platform_id": "_CONTACTS_1013_BILLING",
"type": "BILLING",
"data_model": "CONTACTS",
"data_model_id": "1013",
"street": "123 Main Street",
"locality": "Downtown",
"city": "Metropolis",
"state": "Stateville",
"country": "Countryland",
"pincode": "12345",
"updated_at": "2023-11-06T10:00:00.000Z"
}
]
},
"line_items": {
"data": [
{
"platform_id": "1234567890123456789",
"line_item_type": "BILLS",
"line_item_type_id": "1234567890123456789",
"tracking_category_ids": [
"1234567890123456789"
],
"item_id": "1234567890123456789",
"tax_id": "1234567890123456789",
"account_id": null,
"description": "Test Item",
"quantity": 1,
"unit_amount": 100,
"total_amount": 100,
"sub_total": null,
"tax_amount": 0,
"total_discount": null,
"updated_at": "2021-09-28T15:00:00.000Z"
}
]
}
}
],
"total_count": 1
},
"request_timestamp": "2023-10-27T05:05:28.522Z",
"response_timestamp": "2023-10-27T05:05:28.522Z",
"request_id": "7a1c0e42-9f85-4d6e-bb5d-358a72913c0b"
}
Retrieve sales orders from the database based on the ID
curl --request POST \
--url https://api.rootfi.dev/accounting/sales_orders/all \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '{
"take": 10,
"skip": 0,
"orderBy": {
"total_amount": "asc"
},
"filter": {
"status": {
"eq": "SUBMITTED"
}
}
}'
{
"data": {
"data": [
{
"rootfi_id": 137160,
"rootfi_company_id": 1760,
"rootfi_organisation_id": 1,
"rootfi_integration_type": "QUICKBOOKS_SANDBOX",
"rootfi_updated_at": "2023-10-26T16:14:59.673Z",
"rootfi_created_at": "2023-10-26T16:14:59.685Z",
"platform_id": "1234567890123456789",
"contact_id": "1234567890123456789",
"invoice_ids": [
"3770712000000000099"
],
"currency_id": null,
"document_number": "A-1011",
"posted_date": "2023-01-17T00:00:00.000Z",
"delivery_date": null,
"description": null,
"currency_rate": 1,
"status": "SUBMITTED",
"total_amount": 78.75,
"sub_total": 87.5,
"tax_amount": 0,
"total_discount": 8.75,
"updated_at": "2023-01-17T00:00:00.000Z",
"currency": {
"data": {
"platform_id": null,
"name": null,
"code": null,
"symbol": null,
"is_base_currency": null,
"exchange_rate": null,
"updated_at": null
}
},
"addresses": {
"data": [
{
"platform_id": "_CONTACTS_1013_BILLING",
"type": "BILLING",
"data_model": "CONTACTS",
"data_model_id": "1013",
"street": "123 Main Street",
"locality": "Downtown",
"city": "Metropolis",
"state": "Stateville",
"country": "Countryland",
"pincode": "12345",
"updated_at": "2023-11-06T10:00:00.000Z"
}
]
},
"line_items": {
"data": [
{
"platform_id": "1234567890123456789",
"line_item_type": "BILLS",
"line_item_type_id": "1234567890123456789",
"tracking_category_ids": [
"1234567890123456789"
],
"item_id": "1234567890123456789",
"tax_id": "1234567890123456789",
"account_id": null,
"description": "Test Item",
"quantity": 1,
"unit_amount": 100,
"total_amount": 100,
"sub_total": null,
"tax_amount": 0,
"total_discount": null,
"updated_at": "2021-09-28T15:00:00.000Z"
}
]
}
}
],
"total_count": 1
},
"request_timestamp": "2023-10-27T05:05:28.522Z",
"response_timestamp": "2023-10-27T05:05:28.522Z",
"request_id": "7a1c0e42-9f85-4d6e-bb5d-358a72913c0b"
}
curl --request POST \
--url https://api.rootfi.dev/accounting/sales_orders/all \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '{
"take": 10,
"skip": 0,
"orderBy": {
"total_amount": "asc"
},
"filter": {
"status": {
"eq": "SUBMITTED"
}
}
}'
The response is of type object
.