Schedule editing creation service

Consuming this service is mandatory in the schedule editing flow. As a result of this operation, the merchant will obtain a SEID that will be necessary for the next step of the flow.

The SEID has a time limit for its utilization. This deadline is configured on Carat Portal, and if it’s exceeded, the editing transaction will have its status altered from NOV (new) to EXP (expired), which prevents future operations with this transaction, making it necessary to consume the editing creation service again.

Call details#

  • Resource: /v1/schedules/edits
  • HTTP Method: POST
  • Request format: JSON
  • Response format: JSON
  • Header parameters:
ParameterDescriptionFormatMandatory
merchant_idMerchant code on Carat Portal. The production and certification codes will be different.< 15 ANYES
merchant_keyMerchant authentication key on Carat Portal. The production and certification keys will be different.< 80 ANYES
Content-TypeIt must be sent with the value application/json.= 15 ANYES

Example#

Below is an example of the schedule editing creation service call using the cURL tool.

Request:

To use this example, don't forget to define the variable {{url}} with the value
esitef-homologacao.softwareexpress.com.br

curl
--request POST "https:{{url}}/e-sitef/api/v1/schedules/edits"
--header "Content-Type: application/json"
--header "merchant_id: xxxxxxxxxxxxxxx"
--header "merchant_key: xxxxxxxxxxx"
--data-binary
{
"sid":"qwertyuiopasdfghjklzxcvbnm0123456789qwertyuiopasdfghjklzxcvbnm01",
"merchant_data":"14114532781"
}
--verbose

Authenticity POST:

curl -X POST \
https://www.lojateste.com.br/status.php \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'cache-control: no-cache' \
-d 'seid=qwertyuiopasdfghjklzxcvbnm0123456789qwertyuiopasdfghjklzxcvbnm02&
merchant_data=14114532781&
sid=qwertyuiopasdfghjklzxcvbnm0123456789qwertyuiopasdfghjklzxcvbnm01'

Response:

{
"code":"0",
"message":"OK. Transaction successful."
}

Request parameters#

The table below describes the request parameters of the schedule editing creation service:

ParameterDescriptionFormatMandatory
sidIdentifier of the schedule to be edited.= 64 ANYES
merchant_dataData generated by the merchant that will be returned on the authenticity POST. This field can be used to help the merchant to identify the source of the received authenticity POSTs.< 20 ANNO

Authenticity POST parameters#

The table below describes the parameters sent by Carat Portal on the authenticity POST:

ParameterDescriptionFormat
seidIdentifier of the schedule editing to be used in the next step of the flow.= 64 AN
sidIdentifier of the schedule to be altered.= 64 AN
merchant_dataData sent by the merchant to help identifying the source of the authenticity POST.< 20 AN

Carat Portal can also send new parameters without previous warning, which means that the merchant’s application must be prepared to receive extra fields and just ignore them.

Response parameters#

If successful, the HTTP response code will be 201. Any other code must be interpreted as an error. The table below describes the response parameters of the schedule editing creation service:

ParameterDescriptionFormat
codeCarat Portal response code. Any code different from 0(zero) means failure. Learn more.< 4 N
messageCarat Portal response message.< 500 AN