Company

Overview

A company is the highest-level container for your businesses' locations. With company, you can keep the client's data separate from each other.

For example, one account might have 2 different companies associated with it, WalMart and Target.

Default Fields

The following fields are used to access company data:

Field

Type

Description

name

string

The name associated to the company.

id

int

The ID associated to the company used to make API calls associated to the company.

Additional Fields

Field

Type

Description

remote_id

string

A field intended to make it easier for you to relate your data to ours.

List All Companies

Use this URL to list all companies for the authenticated user:

https://ad1.replypro.io/api/public/accounts/<account_id>/companies

The return will look like this:

{
  "next": null, // Only null if no next page, otherwise URL
  "previous": null, // Only null if no previous page, otherwise URL
  "results": [
    {
      "name": "Reply Pro",
      "id": 1
    },
    {
      "name": "Bardenay",
      "id": 2
    }
  ]
}
🚧

Pagination for 50+ Companies

If you are trying to request for more than 50 companies, you will need to use pagination.

Get Company

Use this URL to request a single company:

https://ad1.replypro.io/api/public/accounts/<account_id>/companies/<company_id>

The return should look like this:

{
  "results": [
    {
      "name": "Reply Pro",
      "id": 1
    }
  ]
}

Adding Companies

To create a new Company, submit a POST request to following URL containing, at minimum, the name for the new Company. A remote_id can also be included in the request.

https://ad1.replypro.io/api/public/accounts/<account_id>/companies
{
  "name": string,
  "remote_id": string // Optional
}

The return from a successful POST to create a business would look something like the following:

{
  "id": 23,
  "name": "New Company"
}

Updating Companies

You can update the name or remote_id fields of the Company object. These can be updated together or separately.

Examples of PUT requests to add new companies or edit existing ones:

https://ad1.replypro.io/api/public/accounts/<account_id>/companies/<company_id>
{
  "name": "Updated Name",
  "remote_id": "new identifier"
}

Example of returned data for adding and making edits:

{
  "id": 23,
  "name": "Updated Name",
  "remote_id": "new identifier" // Only included if changed
}

Filtering

Looking to filter by specific values in a field? Checkout Filters