TRANSACTION V2

Endpoints

Create transaction V2

POST /v2/transactions

Description: Asynchronous interface to create a transaction.

Mandatory rules:

  • It is mandatory to inform store.id or store.externalId
  • It is mandatory to inform employee.id or employee.externalId
  • It is mandatory to inform customer.id or customer.externalId
  • It is mandatory to inform transaction.journeyId or transaction.journeySlug

Business details:

  • The classes of ratingItems must be available for the transaction journey, otherwise the transaction will not be created
  • The value of ratingItems.score must be supported by the class indicator
  • The value of rating.score must be supported by the journey indicator, otherwise the rating will be null
  • Surveys will not be dispatched if the transaction is already evaluated (rating informed)
  • If store.externalId, employee.externalId or customer.externalId do not exist, the respective resources will be created
  • If store.id or employee.id do not exist, the default (id = 1) will be used
  • The informed establishment must be active
  • The customer's phone may contain the country code, if not informed, +55 (BR) will be assumed
POST /v2/transactions HTTP/1.1
Host: public-api.gke-prd.solucx.com.br
x-solucx-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*

Responses:

  • 201 Created: Transaction scheduled for asynchronous creation. Returns the sent object.
  • 400 Bad Request: Some property of the payload is invalid.

Health Check

GET /health

Description: Endpoint to check the API's health.

GET /health HTTP/1.1
Host: public-api.gke-prd.solucx.com.br
Accept: */*

Parameters

No parameters.

Responses:

  • 200 OK: API is operational.

Create transaction (Legacy)

POST /public/transaction

Description: Synchronous (legacy) interface to create a transaction.

Mandatory rules:

  • It is mandatory to inform store_id or store_integration
  • It is mandatory to inform employee_id or employee_integration
  • It is mandatory to inform customer_id or customer_integration
  • It is mandatory to inform journey_id or journey (must be valid)

Business details:

  • The classes of rating_items must be available for the transaction journey, otherwise the transaction will not be created
  • The value of rating_items.score must be supported by the class indicator
  • The value of score must be supported by the journey indicator, otherwise the rating will be null
  • Surveys will not be dispatched if the transaction is already evaluated (score informed)
  • If store_integration, employee_integration or customer_integration do not exist, the respective resources will be created
  • If store_id or employee_id do not exist, the default (id = 1) will be used
  • The informed establishment must be active

Responses:

  • 201 Created: Transaction created successfully.
  • 422 Unprocessable Entity: Validation error.