shipink-logo-vector-svgDocumentation

Address Book

Manage saved customer and recipient addresses.

List address book entries

Returns a paginated list of all saved customer/recipient addresses.

GET
/addresses
AuthorizationBearer <token>

Authenticate using the access_token obtained from POST /token.

Format: Authorization: Bearer {access_token}

In: header

Query Parameters

page?integer

Page number

Default1
Range1 <= value
limit?integer

Number of items per page

Default10
Range1 <= value <= 100
name?string

Filter by name.

phone?string

Filter by main phone number.

email?string

Filter by main email address.

Response Body

application/json

application/json

curl -X GET "https://api.shipink.io/addresses"

{
  "success": true,
  "meta": {
    "status": 200,
    "message": "data successfully received",
    "total": 12
  },
  "data": [
    {
      "id": "b1a2c3d4-0000-0000-0000-111122223333",
      "user_id": "a0b1c2d3-0000-0000-0000-000011112222",
      "name": "Ahmet Yılmaz",
      "company": "Örnek A.Ş.",
      "tax_id": "",
      "sales_channel_customer_id": "",
      "phone": {
        "main": "5552540099",
        "work": "",
        "cell": "",
        "code": "90"
      },
      "email": {
        "main": "ahmet@example.com",
        "work": ""
      },
      "address": {
        "street": "Atatürk Cad. No:1",
        "city": "Kadıköy",
        "city_code": "TR-34-108631",
        "state": "İstanbul",
        "state_code": "TR-34",
        "zip": "34710",
        "country": "Turkey",
        "country_code": "TR",
        "tax_id": "",
        "external_id": null,
        "status": ""
      },
      "billing": {
        "name": "Ahmet",
        "surname": "Yılmaz",
        "phone": "5552540099",
        "email": "ahmet@example.com",
        "tax_id": "",
        "company": "Örnek A.Ş.",
        "external_id": null,
        "address": {
          "street": "Atatürk Cad. No:1",
          "city": "Kadıköy",
          "city_code": "TR-34-108631",
          "state": "İstanbul",
          "state_code": "TR-34",
          "zip": "34710",
          "country": "Turkey",
          "country_code": "TR"
        }
      }
    }
  ]
}
{
  "message": "Unauthorized"
}

Create address book entry

Adds a new customer/recipient address to the address book.

POST
/addresses
AuthorizationBearer <token>

Authenticate using the access_token obtained from POST /token.

Format: Authorization: Bearer {access_token}

In: header

namestring
company?string
tax_id?string
sales_channel_customer_id?string
phone?
email?
address
billing?

Response Body

application/json

application/json

application/json

curl -X POST "https://api.shipink.io/addresses" \  -H "Content-Type: application/json" \  -d '{    "name": "Ahmet Yılmaz",    "address": {      "street": "Example Street No:1",      "city": "Maltepe",      "state": "İstanbul",      "zip": "34857",      "country_code": "TR"    }  }'
{
  "success": true,
  "meta": {
    "status": 200,
    "code": "NOT_FOUND",
    "message": "orders successfully received",
    "total": 100,
    "details": [
      {
        "field": "name",
        "error": "cannot be blank"
      }
    ]
  },
  "data": {
    "id": "b1a2c3d4-0000-0000-0000-111122223333",
    "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
    "name": "Ahmet Yılmaz",
    "company": "",
    "tax_id": "",
    "sales_channel_customer_id": "",
    "phone": {
      "main": "905321234567",
      "work": "",
      "cell": "",
      "code": ""
    },
    "email": {
      "main": "user@example.com",
      "work": ""
    },
    "address": {
      "street": "Example Street No:1",
      "city": "Maltepe",
      "city_code": "TR-34-108146",
      "state": "İstanbul",
      "state_code": "TR-34",
      "zip": "34857",
      "country": "Turkey",
      "country_code": "TR",
      "tax_id": "",
      "external_id": null,
      "status": ""
    },
    "billing": {
      "name": "Ahmet",
      "surname": "Yılmaz",
      "phone": "5552540099",
      "email": "ahmet@example.com",
      "tax_id": "",
      "company": "",
      "external_id": null,
      "address": {
        "street": "Example Street No:1",
        "city": "Maltepe",
        "city_code": "TR-34-108146",
        "state": "İstanbul",
        "state_code": "TR-34",
        "zip": "34857",
        "country": "Turkey",
        "country_code": "TR",
        "tax_id": "",
        "external_id": null,
        "status": ""
      }
    }
  }
}

{
  "success": false,
  "meta": {
    "status": 400,
    "code": "INVALID_INPUT",
    "message": "There is some problem with the data you submitted.",
    "details": [
      {
        "field": "name",
        "error": "cannot be blank"
      }
    ]
  }
}
{
  "message": "Unauthorized"
}

Get an address book entry

Returns a single address book entry.

GET
/addresses/{id}
AuthorizationBearer <token>

Authenticate using the access_token obtained from POST /token.

Format: Authorization: Bearer {access_token}

In: header

Path Parameters

idstring
Formatuuid

Response Body

application/json

application/json

application/json

curl -X GET "https://api.shipink.io/addresses/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "success": true,
  "meta": {
    "status": 200,
    "code": "NOT_FOUND",
    "message": "orders successfully received",
    "total": 100,
    "details": [
      {
        "field": "name",
        "error": "cannot be blank"
      }
    ]
  },
  "data": {
    "id": "b1a2c3d4-0000-0000-0000-111122223333",
    "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
    "name": "Ahmet Yılmaz",
    "company": "",
    "tax_id": "",
    "sales_channel_customer_id": "",
    "phone": {
      "main": "905321234567",
      "work": "",
      "cell": "",
      "code": ""
    },
    "email": {
      "main": "user@example.com",
      "work": ""
    },
    "address": {
      "street": "Example Street No:1",
      "city": "Maltepe",
      "city_code": "TR-34-108146",
      "state": "İstanbul",
      "state_code": "TR-34",
      "zip": "34857",
      "country": "Turkey",
      "country_code": "TR",
      "tax_id": "",
      "external_id": null,
      "status": ""
    },
    "billing": {
      "name": "Ahmet",
      "surname": "Yılmaz",
      "phone": "5552540099",
      "email": "ahmet@example.com",
      "tax_id": "",
      "company": "",
      "external_id": null,
      "address": {
        "street": "Example Street No:1",
        "city": "Maltepe",
        "city_code": "TR-34-108146",
        "state": "İstanbul",
        "state_code": "TR-34",
        "zip": "34857",
        "country": "Turkey",
        "country_code": "TR",
        "tax_id": "",
        "external_id": null,
        "status": ""
      }
    }
  }
}
{
  "message": "Unauthorized"
}

{
  "success": false,
  "meta": {
    "status": 404,
    "code": "NOT_FOUND",
    "message": "The requested resource was not found."
  }
}

Delete address book entry

Permanently deletes an address book entry.

DELETE
/addresses/{id}
AuthorizationBearer <token>

Authenticate using the access_token obtained from POST /token.

Format: Authorization: Bearer {access_token}

In: header

Path Parameters

idstring
Formatuuid

Response Body

application/json

application/json

application/json

curl -X DELETE "https://api.shipink.io/addresses/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "success": true,
  "meta": {
    "status": 200,
    "code": "NOT_FOUND",
    "message": "orders successfully received",
    "total": 100,
    "details": [
      {
        "field": "name",
        "error": "cannot be blank"
      }
    ]
  }
}
{
  "message": "Unauthorized"
}

{
  "success": false,
  "meta": {
    "status": 404,
    "code": "NOT_FOUND",
    "message": "The requested resource was not found."
  }
}

Update address book entry

Updates an existing address book entry. Only the fields you send are changed.

PUT
/addresses/{id}
AuthorizationBearer <token>

Authenticate using the access_token obtained from POST /token.

Format: Authorization: Bearer {access_token}

In: header

Path Parameters

idstring
Formatuuid
namestring
company?string
tax_id?string
sales_channel_customer_id?string
phone?
email?
address
billing?

Response Body

application/json

application/json

application/json

curl -X PUT "https://api.shipink.io/addresses/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "name": "Ahmet Yılmaz",    "address": {      "street": "Example Street No:1",      "city": "Maltepe",      "state": "İstanbul",      "zip": "34857",      "country_code": "TR"    }  }'
{
  "success": true,
  "meta": {
    "status": 200,
    "code": "NOT_FOUND",
    "message": "orders successfully received",
    "total": 100,
    "details": [
      {
        "field": "name",
        "error": "cannot be blank"
      }
    ]
  },
  "data": {
    "id": "b1a2c3d4-0000-0000-0000-111122223333",
    "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
    "name": "Ahmet Yılmaz",
    "company": "",
    "tax_id": "",
    "sales_channel_customer_id": "",
    "phone": {
      "main": "905321234567",
      "work": "",
      "cell": "",
      "code": ""
    },
    "email": {
      "main": "user@example.com",
      "work": ""
    },
    "address": {
      "street": "Example Street No:1",
      "city": "Maltepe",
      "city_code": "TR-34-108146",
      "state": "İstanbul",
      "state_code": "TR-34",
      "zip": "34857",
      "country": "Turkey",
      "country_code": "TR",
      "tax_id": "",
      "external_id": null,
      "status": ""
    },
    "billing": {
      "name": "Ahmet",
      "surname": "Yılmaz",
      "phone": "5552540099",
      "email": "ahmet@example.com",
      "tax_id": "",
      "company": "",
      "external_id": null,
      "address": {
        "street": "Example Street No:1",
        "city": "Maltepe",
        "city_code": "TR-34-108146",
        "state": "İstanbul",
        "state_code": "TR-34",
        "zip": "34857",
        "country": "Turkey",
        "country_code": "TR",
        "tax_id": "",
        "external_id": null,
        "status": ""
      }
    }
  }
}
{
  "message": "Unauthorized"
}

{
  "success": false,
  "meta": {
    "status": 404,
    "code": "NOT_FOUND",
    "message": "The requested resource was not found."
  }
}

How is this guide?