Skip to main content

Create a service request

POSThttps://carchost.fieldcontrol.com.br/tickets

Creates a pending service request. It becomes a work order when accepted, by sending ticket.id when creating the order.

Requires the X-Api-Key, User-Agent and Content-Type: application/json headers. Limit: 1 request per second (learn more).

Request​

Headers

User-Agentstringrequired

Identification of your application.

Example: MinhaIntegracao/1.0.

Request body

JSON, sent with the Content-Type: application/json header.

namestringrequired

Name of the person who requested the service.

At least 5 characters.

messagestringrequired

Request message.

subjectstring

Subject. When equal to the name of a work order type, it allows identifying requests from corporate customers.

identifierstring

Request number. The # character is reserved.

expiredAtstring

Request expiration date.

externalobject
Fields of external
idstring

Request identifier in your system.

Up to 100 characters.Accepts: null.

contactobject

Contact of the person who requested the service.

Fields of contact
emailstring
phonestring
customerobject

Linked customer. Only stored on creation.

Fields of customer
idstring
serviceobject

Linked work order type. Only stored on creation.

Fields of service
idstring
locationobject

Customer location, which must belong to the given customer.

Fields of location
idstring
productslist of objects

Requested products. Only considered on creation.

Fields of products
quantitynumberrequired
productobjectrequired
Fields of product
idstringrequired
serviceslist of objects

Requested services. Only considered on creation.

Fields of services
quantitynumberrequired
serviceobjectrequired
Fields of service
idstringrequired
scheduleSuggestionslist of objects

Date and time suggestions for the service. Only considered on creation.

Fields of scheduleSuggestions
datestring

Date (AAAA-MM-DD).

timestring

Time (HH:MM:SS).

contractorobject

Contracting company, for requests opened on behalf of third parties. Only considered on creation.

Fields of contractor
namestringrequired
logoUrlstringrequired
sourcestringrequired
waypointslist of objects

Route points, with kmTotal, for travel requests. Only considered on creation.

Fields of waypoints
latitudenumberrequired
longitudenumberrequired
kmTotalnumber

Total route distance, in km.

routeslist of objects

Route addresses, in position order. Only considered on creation, together with waypoints and kmTotal.

Fields of routes
positionnumberrequired
postalCodestringrequired
streetstringrequired
numberstring

Accepts: null.

complementstring

Accepts: null.

neighborhoodstringrequired
citystringrequired
statestringrequired
formattedAddressstringrequired
countrystringrequired
placeNamestring

Accepts: null.

placePhonestring

Accepts: null.

latitudenumberrequired
longitudenumberrequired

Responses

  • 201

    Request created, with the created products and services.

  • 401

    API key missing (Missing API Key) or invalid (Invalid API Key). See Authentication.

  • 403

    Account blocked (Account blocked), expired (Account expired) or on a plan that does not allow integration (Account plan not allowed). See Authentication.

  • 422

    Invalid body (resourceValidationErr): name or message missing, # in the number, or location that does not belong to the customer. Nonexistent product or service also returns this error (message: product not found).

  • 429

    Limit of 1 request per second exceeded. See Rate limit.

  • 500

    Unexpected server error.