Create Location
Headers
- enumAcceptconst:application/jsonrequired
Response format. Must be
application/json. - enumContent
- Type const:application/jsonrequiredRequest payload format. Must be
application/jsonwhen a body is sent.
Body·
required
application/json
- Type: stringaccount
_id required - Type: nullableaddressrequiredProperties: 6
Address for a create request. Supplied state, ZIP and country values must be valid. For a US address, use a two-letter state and a five-digit ZIP or ZIP+4. Country defaults to USA when omitted or null. Blank or omitted address details are accepted where the endpoint permits an incomplete address.
- Type: stringnamerequired
- Type: stringnullablecountry
_code - Type: stringnullablecurrency
- Type: stringnullableemail
- Properties: 1Type: Metadatanullablemetadata
- Type: stringnullablephone
- Type: stringnullableprocessor
_config _id - Type: stringstatus
- Type: enumnullablesurcharge
_basis Amount used to calculate percentage-based surcharges. total uses subtotal, tax and tip; subtotal uses subtotal only; subtotal_plus_tax includes tax; subtotal_plus_tip includes tip. The basis is resolved from location, then terminal, then account, skipping null values. The default is total when no level configures a basis.
valuestotalsubtotalsubtotal_plus_taxsubtotal_plus_tip - Type: booleannullablesurcharge
_confirmation _required
Responses
- application/json
- application/json
- application/json
- application/json
Request Example for post/v1/locations
curl https://api.uat.koard.com/v1/locations \
--request POST \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-koard-apikey: YOUR_SECRET_TOKEN' \
--data '{
"name": "",
"account_id": "",
"address": {
"street_line1": "",
"street_line2": "",
"city": "",
"country": "",
"state": "",
"zip": ""
},
"phone": "",
"email": "",
"status": "active",
"processor_config_id": "",
"country_code": "USA",
"currency": "USD",
"terminal_id": "",
"metadata": {
"additionalProperty": "anything"
},
"surcharge_rate": 1,
"surcharge_confirmation_required": true,
"surcharge_basis": "total",
"tax_rate": 1,
"tax_basis": "total"
}'
{
"account_id": "string",
"address": {
"street_line1": "",
"street_line2": "",
"city": "",
"country": "USA",
"state": "",
"zip": ""
},
"country_code": null,
"created_at": null,
"currency": null,
"deleted_at": null,
"email": null,
"id": "string",
"metadata": null,
"name": "string",
"phone": null,
"processor_config_id": null,
"status": "active",
"surcharge_rate": null,
"surcharge_basis": "total",
"surcharge_confirmation_required": null,
"tax_rate": null,
"tax_basis": "total",
"terminal_id": null,
"updated_at": null
}
