Create a puchase order
curl --request POST \
--url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/purchase-orders \
--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"
}
]
}
'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/purchase-orders"
payload = {
"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"
}
]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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'
}
]
})
};
fetch('https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/purchase-orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Purchase Orders
Create a puchase order
Create a puchase order
POST
/
purchase-orders
Create a puchase order
curl --request POST \
--url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/purchase-orders \
--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"
}
]
}
'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/purchase-orders"
payload = {
"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"
}
]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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'
}
]
})
};
fetch('https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/purchase-orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Authorizations
Body
application/json
The body is of type object.
Response
200 - application/json
Successful response
Was this page helpful?
⌘I