curl --request PUT \
--url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/purchase-orders/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"vendor_type": "integrated",
"vendor_id": 1,
"vendor_name": "some string",
"tax_rate ": "some string",
"title": "some string",
"status": "draft",
"payment_status": "unpaid",
"comment": "some string",
"order_at": 12345678,
"expected_delivery_at": 12345678,
"received_at": 12345678,
"customer_id": 1,
"job_id": 1,
"project_id": 1,
"invoice_id": 1,
"assigned_id": 1,
"order_email": "email@email.com",
"delivery_method": "delivery",
"delivery_address": "some string",
"delivery_flat": "some string",
"delivery_city": "some string",
"delivery_state": "some string",
"delivery_postcode": "some string",
"delivery_instruction": "some string",
"pickup_branch_id": "some string",
"order_number": "O123",
"order_phone": "+123456789",
"items": [
{
"id": 1,
"type": "fieldpulse",
"unit_measure": "cm",
"unit_cost": "1.0",
"is_taxed": false,
"tax_rate": "1",
"quantity": "1",
"payment_status": "unpaid"
},
{
"id": 2,
"type": "fieldpulse",
"unit_measure": "cm",
"unit_cost": "1.0",
"is_taxed": false,
"tax_rate": "1",
"quantity": "1",
"payment_status": "unpaid"
}
]
}
'