Skip to content

Change shipping address

POST /v1/change_ship_address

Changes the shipping address of an existing order. Only applies to orders that haven't shipped yet.

Request

Send username, password and secretkey along with a data object. See Making requests.

{
  "username": "YOUR_USERNAME",
  "password": "YOUR_PASSWORD",
  "secretkey": "YOUR_SECRET_KEY",
  "data": {
    "xid": "23542123",
    "order_id": "1001",
    "company": "Acme Inc.",
    "name": "John Doe",
    "address": "123 Main Street",
    "address2": "Suite 100",
    "city": "Los Angeles",
    "zip": "90001",
    "state": "CA",
    "country": "US"
  }
}
curl -X POST https://gatewaybeta.marcofinearts.com/v1/change_ship_address \
  -H "Content-Type: application/json" \
  -d '{
    "username": "YOUR_USERNAME",
    "password": "YOUR_PASSWORD",
    "secretkey": "YOUR_SECRET_KEY",
    "data": {
      "xid": "23542123",
      "order_id": "1001",
      "company": "Acme Inc.",
      "name": "John Doe",
      "address": "123 Main Street",
      "address2": "Suite 100",
      "city": "Los Angeles",
      "zip": "90001",
      "state": "CA",
      "country": "US"
    }
  }'

data fields

Field Required Validation Notes
xid Conditional Your order number. Required if order_id is not passed.
order_id Conditional Marco Fine Arts order ID. Required if xid is not passed.
company Conditional Required if name is empty.
name Conditional Required if company is empty.
address Yes
address2 No
city Yes
zip Yes
state Yes State/province code Validated only when country is US or CA.
country Yes ISO 3166-1 alpha-2 code

Response

{
  "res": "success"
}
{
  "res": "error",
  "code": "000",
  "message": "Error message."
}

Error codes

Code Error Description
601 Authentication failed Your account is invalid or does not have API access. Check username, password and secretkey.
602 Missing field One or more required fields are missing.
609 Invalid country Must be an ISO 3166-1 alpha-2 code.
610 Invalid state Invalid state code for US or Canada.
613 Error Unexpected error. Try again later.
614 Missing field order_id or xid is required.
615 Invalid data Invalid order_id or xid.
620 Error Order has already shipped; shipping details can't be changed.