Skip to content

Addresses ​

Part of the Partners API. Base URL https://your-domain.com/admin/api/v1 — replace the host with your own installation and the token placeholder with a real Bearer token (see Authentication).

List addresses ​

GET /admin/api/v1/partners/partners/{partner_id}/addresses

Retrieve a paginated list of addresses for a specific partner with filtering and sorting

🔒 Requires a valid Bearer token.

Path parameters

ParameterTypeRequiredDescription
partner_idintegerYesThe partner ID

Query parameters

ParameterTypeRequiredDescriptionExample
includestringNoComma-separated list of relationships to include. Available options: creatorcreator
filter[id]stringNoComma-separated list of IDs to filter by
filter[sub_type]stringNoFilter by address type
filter[name]stringNoFilter by address name (partial match)
filter[city]stringNoFilter by city (partial match)
filter[country_id]stringNoComma-separated list of country IDs to filter by
filter[state_id]stringNoComma-separated list of state IDs to filter by
filter[trashed]stringNoFilter by trashed status. Available options: with, without, only
sortstringYesSort fieldname
pageintegerYesPage number1
bash
curl -X GET "https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses?include=creator&sort=name&page=1" \
  -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json"
javascript
const response = await fetch("https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses?include=creator&sort=name&page=1", {
  method: "GET",
  headers: {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
});

const data = await response.json();
console.log(data);
php
<?php

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses?include=creator&sort=name&page=1', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
]);

$data = json_decode($response->getBody(), true);
python
import requests

url = "https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses?include=creator&sort=name&page=1"

headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

response = requests.get(url, headers=headers)

data = response.json()
print(data)

Example response 200

json
{
  "data": [
    {
      "id": 1,
      "sub_type": "company",
      "name": "My Company",
      "email": "info@mycompany.local",
      "phone": "1234567890",
      "mobile": "1234567890",
      "street1": null,
      "street2": null,
      "city": null,
      "zip": null,
      "country_id": 104,
      "state_id": null,
      "parent_id": null,
      "creator_id": 1,
      "created_at": "2026-10-09T07:12:47.000000Z",
      "updated_at": "2026-10-09T08:18:15.000000Z",
      "deleted_at": null,
      "country": {
        "id": 104,
        "name": "India",
        "code": "IN",
        "phone_code": "91",
        "state_required": true,
        "zip_required": true,
        "currency_id": 20,
        "created_at": "2026-10-09T07:12:47.000000Z",
        "updated_at": "2026-10-09T07:12:47.000000Z"
      },
      "state": null
    },
    {
      "id": 1,
      "sub_type": "company",
      "name": "My Company",
      "email": "info@mycompany.local",
      "phone": "1234567890",
      "mobile": "1234567890",
      "street1": null,
      "street2": null,
      "city": null,
      "zip": null,
      "country_id": 104,
      "state_id": null,
      "parent_id": null,
      "creator_id": 1,
      "created_at": "2026-10-09T07:12:47.000000Z",
      "updated_at": "2026-10-09T08:18:15.000000Z",
      "deleted_at": null,
      "country": {
        "id": 104,
        "name": "India",
        "code": "IN",
        "phone_code": "91",
        "state_required": true,
        "zip_required": true,
        "currency_id": 20,
        "created_at": "2026-10-09T07:12:47.000000Z",
        "updated_at": "2026-10-09T07:12:47.000000Z"
      },
      "state": null
    }
  ],
  "links": {
    "first": "/?page=1",
    "last": "/?page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "links": [
      {
        "url": null,
        "label": "&laquo; Previous",
        "page": null,
        "active": false
      },
      {
        "url": "/?page=1",
        "label": "1",
        "page": 1,
        "active": true
      },
      {
        "url": null,
        "label": "Next &raquo;",
        "page": null,
        "active": false
      }
    ],
    "path": "/",
    "per_page": 10,
    "to": 2,
    "total": 2
  }
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Create address ​

POST /admin/api/v1/partners/partners/{partner_id}/addresses

Create a new address for a specific partner

🔒 Requires a valid Bearer token.

Path parameters

ParameterTypeRequiredDescription
partner_idintegerYesThe partner ID

Body parameters

ParameterTypeRequiredDescription
sub_typestringYesAddress type.
namestringYesAddress name or label (max 255 characters). Must not be greater than 255 characters.
emailstringNoEmail address (max 255 characters). Must be a valid email address. Must not be greater than 255 characters.
phonestringNoPhone number (max 20 characters). Must not be greater than 20 characters.
mobilestringNoMobile number (max 20 characters). Must not be greater than 20 characters.
street1stringNoStreet address line 1 (max 255 characters). Must not be greater than 255 characters.
street2stringNoStreet address line 2 (max 255 characters). Must not be greater than 255 characters.
citystringNoCity (max 255 characters). Must not be greater than 255 characters.
zipstringNoPostal/ZIP code (max 20 characters). Must not be greater than 20 characters.
state_idintegerNoState ID. Must match an existing stored value.
country_idintegerNoCountry ID. Must match an existing stored value.
bash
curl -X POST "https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses" \
  -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "sub_type": "invoice",
  "name": "Main Office",
  "email": "office@company.com",
  "phone": "+1234567890",
  "mobile": "+1234567890",
  "street1": "123 Main Street",
  "street2": "Suite 100",
  "city": "New York",
  "zip": "10001",
  "state_id": 9,
  "country_id": 233
}'
javascript
const response = await fetch("https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses", {
  method: "POST",
  headers: {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "sub_type": "invoice",
  "name": "Main Office",
  "email": "office@company.com",
  "phone": "+1234567890",
  "mobile": "+1234567890",
  "street1": "123 Main Street",
  "street2": "Suite 100",
  "city": "New York",
  "zip": "10001",
  "state_id": 9,
  "country_id": 233
}),
});

const data = await response.json();
console.log(data);
php
<?php

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'json' => [
    'sub_type' => 'invoice',
    'name' => 'Main Office',
    'email' => 'office@company.com',
    'phone' => '+1234567890',
    'mobile' => '+1234567890',
    'street1' => '123 Main Street',
    'street2' => 'Suite 100',
    'city' => 'New York',
    'zip' => '10001',
    'state_id' => 9,
    'country_id' => 233,
  ],
]);

$data = json_decode($response->getBody(), true);
python
import requests

url = "https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses"

headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = {
    "sub_type": "invoice",
    "name": "Main Office",
    "email": "office@company.com",
    "phone": "+1234567890",
    "mobile": "+1234567890",
    "street1": "123 Main Street",
    "street2": "Suite 100",
    "city": "New York",
    "zip": "10001",
    "state_id": 9,
    "country_id": 233,
}

response = requests.post(url, headers=headers, json=payload)

data = response.json()
print(data)

Example response 201

json
{
  "data": {
    "id": 1,
    "sub_type": "company",
    "name": "My Company",
    "email": "info@mycompany.local",
    "phone": "1234567890",
    "mobile": "1234567890",
    "street1": null,
    "street2": null,
    "city": null,
    "zip": null,
    "country_id": 104,
    "state_id": null,
    "parent_id": null,
    "creator_id": 1,
    "created_at": "2026-10-09T07:12:47.000000Z",
    "updated_at": "2026-10-09T08:18:15.000000Z",
    "deleted_at": null,
    "country": {
      "id": 104,
      "name": "India",
      "code": "IN",
      "phone_code": "91",
      "state_required": true,
      "zip_required": true,
      "currency_id": 20,
      "created_at": "2026-10-09T07:12:47.000000Z",
      "updated_at": "2026-10-09T07:12:47.000000Z"
    },
    "state": null
  },
  "message": "Address created successfully."
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Show address ​

GET /admin/api/v1/partners/partners/{partner_id}/addresses/{id}

Retrieve a specific address by its ID

🔒 Requires a valid Bearer token.

Path parameters

ParameterTypeRequiredDescription
partner_idintegerYesThe partner ID
idintegerYesThe address ID

Query parameters

ParameterTypeRequiredDescriptionExample
includestringNoComma-separated list of relationships to include. Available options: creatorcountry,state
bash
curl -X GET "https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses/{id}?include=country%2Cstate" \
  -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json"
javascript
const response = await fetch("https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses/{id}?include=country%2Cstate", {
  method: "GET",
  headers: {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
});

const data = await response.json();
console.log(data);
php
<?php

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses/{id}?include=country%2Cstate', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
]);

$data = json_decode($response->getBody(), true);
python
import requests

url = "https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses/{id}?include=country%2Cstate"

headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

response = requests.get(url, headers=headers)

data = response.json()
print(data)

Example response 200

json
{
  "data": {
    "id": 1,
    "sub_type": "company",
    "name": "My Company",
    "email": "info@mycompany.local",
    "phone": "1234567890",
    "mobile": "1234567890",
    "street1": null,
    "street2": null,
    "city": null,
    "zip": null,
    "country_id": 104,
    "state_id": null,
    "parent_id": null,
    "creator_id": 1,
    "created_at": "2026-10-09T07:12:47.000000Z",
    "updated_at": "2026-10-09T08:18:15.000000Z",
    "deleted_at": null,
    "country": {
      "id": 104,
      "name": "India",
      "code": "IN",
      "phone_code": "91",
      "state_required": true,
      "zip_required": true,
      "currency_id": 20,
      "created_at": "2026-10-09T07:12:47.000000Z",
      "updated_at": "2026-10-09T07:12:47.000000Z"
    },
    "state": null,
    "parent": null
  }
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Update address ​

PUT /admin/api/v1/partners/partners/{partner_id}/addresses/{id}

Update an existing address

🔒 Requires a valid Bearer token.

Path parameters

ParameterTypeRequiredDescription
partner_idintegerYesThe partner ID
idintegerYesThe address ID

Body parameters

ParameterTypeRequiredDescription
sub_typestringNoAddress type.
namestringNoAddress name or label (max 255 characters). Must not be greater than 255 characters.
emailstringNoEmail address (max 255 characters). Must be a valid email address. Must not be greater than 255 characters.
phonestringNoPhone number (max 20 characters). Must not be greater than 20 characters.
mobilestringNoMobile number (max 20 characters). Must not be greater than 20 characters.
street1stringNoStreet address line 1 (max 255 characters). Must not be greater than 255 characters.
street2stringNoStreet address line 2 (max 255 characters). Must not be greater than 255 characters.
citystringNoCity (max 255 characters). Must not be greater than 255 characters.
zipstringNoPostal/ZIP code (max 20 characters). Must not be greater than 20 characters.
state_idintegerNoState ID. Must match an existing stored value.
country_idintegerNoCountry ID. Must match an existing stored value.
bash
curl -X PUT "https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses/{id}" \
  -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "sub_type": "invoice",
  "name": "Main Office",
  "email": "office@company.com",
  "phone": "+1234567890",
  "mobile": "+1234567890",
  "street1": "123 Main Street",
  "street2": "Suite 100",
  "city": "New York",
  "zip": "10001",
  "state_id": 9,
  "country_id": 233
}'
javascript
const response = await fetch("https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses/{id}", {
  method: "PUT",
  headers: {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "sub_type": "invoice",
  "name": "Main Office",
  "email": "office@company.com",
  "phone": "+1234567890",
  "mobile": "+1234567890",
  "street1": "123 Main Street",
  "street2": "Suite 100",
  "city": "New York",
  "zip": "10001",
  "state_id": 9,
  "country_id": 233
}),
});

const data = await response.json();
console.log(data);
php
<?php

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses/{id}', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'json' => [
    'sub_type' => 'invoice',
    'name' => 'Main Office',
    'email' => 'office@company.com',
    'phone' => '+1234567890',
    'mobile' => '+1234567890',
    'street1' => '123 Main Street',
    'street2' => 'Suite 100',
    'city' => 'New York',
    'zip' => '10001',
    'state_id' => 9,
    'country_id' => 233,
  ],
]);

$data = json_decode($response->getBody(), true);
python
import requests

url = "https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses/{id}"

headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = {
    "sub_type": "invoice",
    "name": "Main Office",
    "email": "office@company.com",
    "phone": "+1234567890",
    "mobile": "+1234567890",
    "street1": "123 Main Street",
    "street2": "Suite 100",
    "city": "New York",
    "zip": "10001",
    "state_id": 9,
    "country_id": 233,
}

response = requests.put(url, headers=headers, json=payload)

data = response.json()
print(data)

Example response 200

json
{
  "data": {
    "id": 1,
    "sub_type": "company",
    "name": "My Company",
    "email": "info@mycompany.local",
    "phone": "1234567890",
    "mobile": "1234567890",
    "street1": null,
    "street2": null,
    "city": null,
    "zip": null,
    "country_id": 104,
    "state_id": null,
    "parent_id": null,
    "creator_id": 1,
    "created_at": "2026-10-09T07:12:47.000000Z",
    "updated_at": "2026-10-09T08:18:15.000000Z",
    "deleted_at": null,
    "country": {
      "id": 104,
      "name": "India",
      "code": "IN",
      "phone_code": "91",
      "state_required": true,
      "zip_required": true,
      "currency_id": 20,
      "created_at": "2026-10-09T07:12:47.000000Z",
      "updated_at": "2026-10-09T07:12:47.000000Z"
    },
    "state": null,
    "parent": null
  },
  "message": "Address updated successfully."
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Delete address ​

DELETE /admin/api/v1/partners/partners/{partner_id}/addresses/{id}

Soft delete an address

🔒 Requires a valid Bearer token.

Path parameters

ParameterTypeRequiredDescription
partner_idintegerYesThe partner ID
idintegerYesThe address ID
bash
curl -X DELETE "https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses/{id}" \
  -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json"
javascript
const response = await fetch("https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses/{id}", {
  method: "DELETE",
  headers: {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
});

const data = await response.json();
console.log(data);
php
<?php

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses/{id}', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
]);

$data = json_decode($response->getBody(), true);
python
import requests

url = "https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses/{id}"

headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

response = requests.delete(url, headers=headers)

data = response.json()
print(data)

Example response 200

json
{
  "message": "Address deleted successfully."
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Restore address ​

POST /admin/api/v1/partners/partners/{partner_id}/addresses/{id}/restore

Restore a soft-deleted address

🔒 Requires a valid Bearer token.

Path parameters

ParameterTypeRequiredDescription
partner_idintegerYesThe partner ID
idintegerYesThe address ID
bash
curl -X POST "https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses/{id}/restore" \
  -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json"
javascript
const response = await fetch("https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses/{id}/restore", {
  method: "POST",
  headers: {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
});

const data = await response.json();
console.log(data);
php
<?php

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses/{id}/restore', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
]);

$data = json_decode($response->getBody(), true);
python
import requests

url = "https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses/{id}/restore"

headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

response = requests.post(url, headers=headers)

data = response.json()
print(data)

Example response 200

json
{
  "message": "Address restored successfully."
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Force delete address ​

DELETE /admin/api/v1/partners/partners/{partner_id}/addresses/{id}/force

Permanently delete an address

🔒 Requires a valid Bearer token.

Path parameters

ParameterTypeRequiredDescription
partner_idintegerYesThe partner ID
idintegerYesThe address ID
bash
curl -X DELETE "https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses/{id}/force" \
  -H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json"
javascript
const response = await fetch("https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses/{id}/force", {
  method: "DELETE",
  headers: {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
  },
});

const data = await response.json();
console.log(data);
php
<?php

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses/{id}/force', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
]);

$data = json_decode($response->getBody(), true);
python
import requests

url = "https://your-domain.com/admin/api/v1/partners/partners/{partner_id}/addresses/{id}/force"

headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

response = requests.delete(url, headers=headers)

data = response.json()
print(data)

Example response 200

json
{
  "message": "Address permanently deleted."
}
Error response — 401
json
{
  "message": "Unauthenticated."
}

Released under the MIT License.