I have a problem posting an SOP to api.columbus.sage.com/.../sop_orders
It comes down to tax_code_id.
We have products that are either Standard Rated ( VAT @ 20%) or Zero Rated (0%)
When I post an order with lines that have products that are Standard Rated - Sage will accept the order
When I post an order with lines that contain products that have Zero Rated - I get a 400 error.
So the JSON packet below contains 1 standard and 1 zero rated product.
This JSON packet fails to post.
If I remove the product "TEST" the order succeeds
If I specify the standard rate tax code ID within the line for TEST the order succeeds
If I remove all reference to tax codes on all lines, the order fails.
If I post 1 line with a Standard Rate product the order succeeds
If I post 1 line with a Zero Rated product the order fails
I dont think its a JSON issue, although happy to be proved wrong!
The tax_code_id is the tax_code_id I get from the product object.
The ID also validates when I query tax codes independantly.
Can anyone suggest what might be going wrong?
{
"customer_id": 499999,
"document_no": "WEBORDER-TEST",
"is_editing": false,
"customer_document_no": "WEB ORDER 23-01",
"document_discount_percent": 0,
"payment_with_order": true,
"invoice_payment_with_order_immediately": true,
"payment_value": 50.00,
"payment_reference": "TEST_1AbYLOmzY",
"payment_method_id": 530316,
"delivery_address": {
"postal_name": "Chris Testing",
"address_1": "Some Road",
"city": "Somecity",
"county": "Acounty",
"country": "GB",
"postcode": "NE1 1NE",
"contact": "Chris",
"telephone_number": "07967123456",
"email_address": "[email protected]"
},
"lines": [
{
"line_type": "EnumLineTypeStandard",
"product_id": 937295,
"warehouse_id": 931948,
"code": "MYPRODUCT",
"description": "MYPROD (Standard Rated)",
"line_quantity": 1,
"tax_code_id": 1760,
"selling_unit_price": 30.00,
"selling_unit_price_overridden": true
},
{
"line_type": "EnumLineTypeStandard",
"product_id": 938423,
"warehouse_id": 931948,
"code": "TEST",
"description": "Test (Zero rated transactions)",
"line_quantity": 2,
"tax_code_id": 1767,
"selling_unit_price": 4.00,
"selling_unit_price_overridden": true
},
{
"line_type": "EnumLineTypeCharge",
"product_id": 1022221,
"warehouse_id": 931948,
"code": "CAR_1",
"description": "Website Carriage",
"line_quantity": 1,
"selling_unit_price": 10.00
}
]
}