CompanyEntity

Endpoints relating to CompanyEntity objects

List of company entity objects

Returns a list of the company entity objects in the network.

Request
query Parameters
page
integer >= 1
Default: 1

Page number of the page to retrieve

Example: page=1
per
integer [ 1 .. 100 ]
Default: 20

Count of items in each page. Should be between 1 and 100 (inclusive)

Example: per=20
f.ref
string

The ref for the company entity

f.company_id
string

The id for the company entity's parent company

f.company_ref
string

The ref for the company entity's parent company

Responses
200

collection of company entities

Response Schema: application/json
_object
string
self
string
version
integer
object
_object
string
prev
string or null
next
string or null
total_count
integer
Array of objects (CompanyEntity)
400

error

get/network/company_entities
Response samples
application/json

Success

{
  • "_object": "/api/response",
  • "version": 2,
  • "data": {
    • "_object": "/api/collections/paginated",
    • "next": null,
    • "total_count": 121,
    • "data": [
      • {
        }
      ]
    }
}

Create and return a new company entity

Request
Request Body schema: application/json
required
name
required
string

Always required. Legal name of the new company entity

company_id
string

The id of the new company entity's parent company. Either company_id or company_ref is required

company_ref
string

The ref of the new company entity's parent company. Either company_id or company_ref is required

required
object

Always Required. The object representing the mailing address of the company entity.

street_address
string
street_address2
string
city
string
state
string
country_code
string
zip
string
unlocode
string
ref
string

Not required. The ref that will be created for the new company entity

Array of objects (WriteVatNumber)

Not required. An array of VAT Numbers for the new company entity.

Array
country_code
required
string

ISO 3166 two-letter country code

number
required
string

Full VAT number, including the country code

Responses
200

The created company entity

Response Schema: application/json
_object
string
self
string
version
integer
object (CompanyEntity)
_object
string

Type of the object

id
integer
name
string
ref
string
object (Address)
Array of objects (VatNumber)
400

error

post/network/company_entities
Request samples
application/json
{
  • "name": "Zoomit",
  • "company_id": "2UXaj4xcHoW8nwh9UVOMpw",
  • "company_ref": "Zoomit",
  • "mailing_address": {
    • "street_address": "1641 Settlers Lane",
    • "street_address2": "STE 2918",
    • "city": "Albany",
    • "state": "MN",
    • "country_code": "US",
    • "zip": "56307",
    • "unlocode": "USAL2"
    },
  • "ref": "my-zoomit-ref",
  • "vat_numbers": [
    • {
      • "country_code": "GB",
      • "number": "GB 123456789"
      }
    ]
}
Response samples
application/json

Success

{
  • "_object": "/api/response",
  • "version": 2,
  • "data": {
    • "_object": "/company_entity",
    • "id": 9281,
    • "name": "Zoomit",
    • "ref": "my-zoomit-ref",
    • "mailing_address": {
      • "_object": "/address",
      • "street_address": "1641 Settlers Lane",
      • "street_address2": "STE 2918",
      • "city": "Albany",
      • "state": "MN",
      • "country": "United States of America",
      • "country_code": "US",
      • "zip": "56307",
      • "unlocode": "USAL2",
      • "timezone": "America/Los_Angeles",
      • "ref": "my-address-ref"
      },
    • "vat_numbers": [
      • {
        }
      ]
    }
}

Retrieve a company entity

Retrieves the details of a single company entity

Request
path Parameters
id
required
string

The unique id for the requested company entity

Responses
200

Success

Response Schema: application/json
_object
string
self
string
version
integer
object (CompanyEntity)
_object
string

Type of the object

id
integer
name
string
ref
string
object (Address)
Array of objects (VatNumber)
400

error

get/network/company_entities/{id}
Response samples
application/json
{
  • "_object": "/api/response",
  • "version": 2,
  • "data": {
    • "_object": "/company_entity",
    • "id": 9281,
    • "name": "Zoomit",
    • "mailing_address": {
      • "_object": "/address",
      • "street_address": "1641 Settlers Lane",
      • "street_address2": "STE 2918",
      • "city": "Albany",
      • "state": "MN",
      • "country": "United States of America",
      • "country_code": "US",
      • "zip": "56307",
      • "unlocode": "USAL2",
      • "timezone": "America/Los_Angeles",
      • "ref": "my-address-ref"
      },
    • "ref": "zoomit_ref",
    • "vat_numbers": [
      • {
        }
      ]
    }
}

Update a company entity

Request
path Parameters
id
required
string

The unique id for the requested company entity

Request Body schema: application/json
required
name
string

The new legal name of the company entity

object (AddressForRequestBody)
street_address
string
street_address2
string
city
string
state
string
country_code
string
zip
string
unlocode
string
ref
string

The new ref that will be used for the company entity

Array of objects (WriteVatNumber)

If a value for vat_numbers is specified, the array specified will replace all the existing VAT numbers of the company entity

Array
country_code
required
string

ISO 3166 two-letter country code

number
required
string

Full VAT number, including the country code

Responses
200

Success

Response Schema: application/json
_object
string
self
string
version
integer
object (CompanyEntity)
_object
string

Type of the object

id
integer
name
string
ref
string
object (Address)
Array of objects (VatNumber)
400

error

patch/network/company_entities/{id}
Request samples
application/json
{
  • "name": "Zoomit V2",
  • "mailing_address": {
    • "street_address": "1641 Settlers Lane",
    • "street_address2": "STE 2918",
    • "city": "Albany",
    • "state": "MN",
    • "country_code": "US",
    • "zip": "56307",
    • "unlocode": "USAL2"
    },
  • "ref": "zoomit-us",
  • "vat_numbers": [
    • {
      • "country_code": "GB",
      • "number": "GB 123456789"
      }
    ]
}
Response samples
application/json

Success

{
  • "_object": "/api/response",
  • "version": 2,
  • "data": {
    • "_object": "/company_entity",
    • "id": 9281,
    • "name": "Zoomit V2",
    • "ref": "zoomit-us",
    • "mailing_address": {
      • "_object": "/address",
      • "street_address": "1641 Settlers Lane",
      • "street_address2": "STE 2918",
      • "city": "Albany",
      • "state": "MN",
      • "country": "United States of America",
      • "country_code": "US",
      • "zip": "56307",
      • "unlocode": "USAL2",
      • "timezone": "America/Los_Angeles",
      • "ref": "my-address-ref"
      },
    • "vat_numbers": [
      • {
        }
      ]
    }
}