Docs
Enterprises

Enterprises

List Enterprises

GET /v2/enterprises/

ParameterDescription
attributesSpecifies which attributes to retrieve. Can include values like 'serial', 'number', 'carrier', 'service_provider', and 'batch'. If null, retrieves all information.
includesSpecifies related entities to include in the query. Contains arrays for 'device' and 'enterprise', each with its own set of possible values, such as 'name', 'imei', 'code' for the 'device' array, and 'name', 'cnpj' for the 'enterprise' array.
filtersSpecifies filters for various fields such as 'chips.serial', 'chips.number', 'chips.carrier', 'chips.service_provider', 'chips.batch', 'device.name', 'device.imei', 'device.code', 'enterprise.name', 'enterprise.cnpj'. Each filter field supports conditions like 'eq', 'neq', 'ilk', 'ew', 'sw'.
searchSpecifies the search query with a maximum length of 100 characters.
limitSpecifies the maximum number of results to return. Must be a number between 1 and 100.
pageSpecifies the page number for paginated results. Must be a number greater than or equal to 0.
countIndicates whether to include the total count of results in the response.
sortSpecifies sorting criteria for 'number' and 'serial' fields. Values can be -1 (descending order) or 1 (ascending order).

Responses

StatusMeaningDescription
200OKDefault Response
400Bad RequestBad Request

This operation does not require authentication

Create Enterprises

POST /v2/enterprises/

Payload

{
  "body": {
    "data": {
      "attributes": {
        "name": "Example Company",
        "cnpj": "12345678901234",
        "timezone": "America/New_York",
        "phone1": "(123) 456-7890",
        "phone2":"(123) 123-4567",
        "email": "info@example.com",
        "contact_name": "John Doe",
        "webpage": "http://example.com",
        "assistance_emergency_tel": "911",
        "theft_emergency_tel": "911",
        "fantasy_name": "Example"
      },
      "relationships": {
        "country": {
          "type": "country",
          "id": "abc1234567890def"
        }
      }
    }
  }
}
FieldDescriptionRequired
dataObject containing data attributes and relationships.true
attributesObject containing attributes of the company.true
- nameString named after the name of the company, maximum length of 250 characters.true
- cnpjString named after the CNPJ of the company, maximum length of 25 characters.true
- timezoneString named after the timezone of the company, must be a valid timezone string from the list of known timezones, or null.true
- phone1String named after the primary phone number of the company, maximum length of 100 characters, or null.false
- phone2String named after the secondary phone number of the company, maximum length of 100 characters, or null.false
- emailString named after the email address of the company, maximum length of 100 characters, or null.false
- contact_nameString named after the contact name of the company, maximum length of 100 characters, or null.false
- webpageString named after the webpage URL of the company, maximum length of 255 characters, or null.false
- assistance_emergency_telString named after the assistance emergency telephone number of the company, maximum length of 100 characters, or null.false
- theft_emergency_telString named after the theft emergency telephone number of the company, maximum length of 100 characters, or null.false
- fantasy_nameString named after the fantasy name of the company, maximum length of 100 characters, or null.false
relationshipsObject containing relationship information.true
- countryObject representing the relationship with a country.false
-- typeString named after the type of relationship, must be 'country'.true
-- idString named after the ID of the country, must consist of 15 alphanumeric characters.true

Responses

StatusMeaningDescription
200OKDefault Response
400Bad RequestOne of 'Bad Request' or 'Failed to Create Enterprise'

This operation does not require authentication

Show Enterprise

GET /v2/enterprises/{id}

ParameterDescriptionRequired
attributesAn optional array of strings specifying the attributes to be retrieved. Valid attributes include 'name', 'phone1', 'phone2', 'email', 'contact_name', 'created_at', 'updated_at', 'deactivated_at', 'cnpj', 'webpage', 'timezone', 'assistance_emergency_tel', 'theft_emergency_tel', 'fantasy_name'. If null, all information is retrieved.false
includesAn optional object specifying related entities to include in the query. Contains arrays for 'addresses' and 'document'. Each array can include values like 'formatted_address', 'city', 'region', 'zip_code', 'file_size', 'created_at', 'folder', 'key_name', 'mime', 'name'.false
- addressesAn array of address attributes to include in the response. Valid attributes include 'formatted_address', 'city', 'region', 'zip_code'.false
- documentAn array of document attributes to include in the response. Valid attributes include 'file_size', 'created_at', 'folder', 'key_name', 'mime', 'name'.false

Responses

StatusMeaningDescription
200OKDefault Response
400Bad RequestBad Request
401UnauthorizedUnauthorized
404Not FoundNot Found

This operation does not require authentication

Update Enterprises

PATCH /v2/enterprises/{id}

Payload

{
  "body": {
    "data": {
      "attributes": {
        "name": "Example Company",
        "cnpj": "12345678901234",
        "timezone": "America/New_York",
        "phone1": "(123) 456-7890",
        "phone2":"(123) 123-4567",
        "email": "info@example.com",
        "contact_name": "John Doe",
        "webpage": "http://example.com",
        "assistance_emergency_tel": "911",
        "theft_emergency_tel": "911",
        "fantasy_name": "Example"
      },
      "relationships": {
        "country": {
          "type": "country",
          "id": "abc1234567890def"
        }
      }
    }
  }
}
FieldDescriptionRequired
dataObject containing data attributes and relationships.true
attributesObject containing attributes of the company.true
- nameString named after the name of the company, maximum length of 250 characters.true
- cnpjString named after the CNPJ of the company, maximum length of 25 characters.true
- timezoneString named after the timezone of the company, must be a valid timezone string from the list of known timezones, or null.true
- phone1String named after the primary phone number of the company, maximum length of 100 characters, or null.false
- phone2String named after the secondary phone number of the company, maximum length of 100 characters, or null.false
- emailString named after the email address of the company, maximum length of 100 characters, or null.false
- contact_nameString named after the contact name of the company, maximum length of 100 characters, or null.false
- webpageString named after the webpage URL of the company, maximum length of 255 characters, or null.false
- assistance_emergency_telString named after the assistance emergency telephone number of the company, maximum length of 100 characters, or null.false
- theft_emergency_telString named after the theft emergency telephone number of the company, maximum length of 100 characters, or null.false
- fantasy_nameString named after the fantasy name of the company, maximum length of 100 characters, or null.false
relationshipsObject containing relationship information.true
- countryObject representing the relationship with a country.false
-- typeString named after the type of relationship, must be 'country'.true
-- idString named after the ID of the country, must consist of 15 alphanumeric characters.true

Responses

StatusMeaningDescription
200OKDefault Response
400Bad RequestBad Request
401UnauthorizedUnauthorized
404Not FoundNot Found

This operation does not require authentication

Delete Enterprises

DELETE /v2/enterprises/{id}

Parameters

{
  "params": {
    "id": "ABC1234567890DEF"
  }
}
FieldDescriptionRequired
idString specifying the ID. Must be alphanumeric and exactly 15 characters long.true

Responses

StatusMeaningDescription
200OKDefault Response
400Bad RequestOne of 'Bad Request', 'Cannot Delete Self Enterprise', 'Cannot Delete a Main Client Enterprise', 'Cannot Delete Enterprise With Other Affiliations', 'Invalid Affiliation', 'Enterprise Not Affiliated' or 'Cannot Delete Enterprise With Devices, Chips, Vehicles or Users'
401UnauthorizedUnauthorized
404Not FoundNot Found

This operation does not require authentication

Update {situation} Enterprises

PATCH /v2/enterprises/{id}/status/{situation}

Parameters

{
  "params": {
    "id": "ABC1234567890DEF",
    "situation": "activation"
  }
}
FieldDescriptionRequired
idString containing the ID, must follow the alphanumeric pattern and have a length of 15 characters.true
situationString indicating the situation, must be either 'activation' or 'deactivation'.true

Responses

StatusMeaningDescription
200OKDefault Response

This operation does not require authentication