Actually when we are setting the individual tax ids to the line items in the ORDERS api:
https://connect.squareupsandbox.com/v2/locations/{location_id}/orders
we are setting the applied_taxes parameters and then setting the uid of the tax. But when we submit the api it is saying us:
stdClass Object
(
[errors] => Array
(
[0] => stdClass Object
(
[code] => VALUE_EMPTY
[detail] => Field must not be blank
[field] => order.line_items[0].applied_taxes[0].tax_uid
[category] => INVALID_REQUEST_ERROR
)
)
)
But in the api documentation it is asking to fill uid not the tax_uid.
Moreover when we fetches the tax data it is coming like this:
stdClass Object
(
[object] => stdClass Object
(
[type] => TAX
[id] => EHXLVURA6ETOI7HH6IZLW6IM
[updated_at] => 2020-10-20T10:55:02.256Z
[version] => 1603191302256
[is_deleted] =>
[present_at_all_locations] => 1
[tax_data] => stdClass Object
(
[name] => First Tax
[calculation_phase] => TAX_SUBTOTAL_PHASE
[inclusion_type] => INCLUSIVE
[percentage] => 1.0
[applies_to_custom_amounts] =>
[enabled] => 1
[tax_type_id] => us_sales_tax
[tax_type_name] => Sales Tax
)
)
)
Could you please let us know what we need to fill in the applied_taxes object uid or tax_uid and could you please let us know how to get this ids from the tax data?
Thanks