Introduction

The LATAM Pass PNA Accrual API allows our partners to manage the accrual of non-airline points for LATAM Pass members, in accordance with the current commercial agreement. When a partner submits an accrual request, processing is performed asynchronously.

There are two options for checking the status of the process:

  1. Accrual notification, an automatic response is received via a webhook that delivers the information to the configured endpoint when the accrual is complete, preventing the partner company from having to constantly check the API.
  2. Get accrual.

It is recommended to use only webhook notification. If you decide to implement both mechanisms, the query should only be used if the notification is not received after 24 hours.

To receive notifications, the alliance must save the correlationId, delivered in the initial response to the request, to link the notification to the original request.

The accumulation webhook does not communicate HTTP 4xx or 5xx error codes, as its purpose is only to report the final status of the transaction, which can be PROCESSED or CANCELLED. If the partner's service responds with 4xx or 5xx codes during the notification delivery attempt, the notification will be considered undelivered and the system will activate automatic retries for a maximum period of 7 days.

Baseline Gantt chart

Access the basic Gantt chart, a diagram that presents the activities, deadlines, and dependencies of each type of partnership with the program in a structured manner, using the links provided.

  1. New partnerships;
  2. Existing partnerships migrating to the LATAM Pass PNA API.

Data required to configure integration

To successfully integrate the accrual notification with LATAM Pass, for both test and production environments, the following data must be provided:

  1. URL of the partner server: endpoint where LATAM Pass will send the accrual results via webhook. Example: https://api.mycompany.com/accrual-webhook
  2. Username for basic authentication on partner server;
  3. Password for basic authentication on partner server;
  4. Additional headers (if necessary): any HTTP header required by the alliance API.

Any modification or deletion of configurations already made must be managed through a request to the Support Center, by environment (testing or production), as detailed in the following flow:

For more information, please consult the LATAM Pass portal FAQ.

Notification content

  • nonAirAccrual:
    • String ffn: LATAM Pass member code that identifies the accrued account;
    • String latamAccrualId: accrual transaction identification code referenced in the billing file;
    • String status: accrual request status:
      • CANCELLED: rejected request. The requested accrual was not credited to the member's account for balance composition. This is the only status to be considered for transaction reversal on the partner side;
      • PROCESSED: granted accrual. The requested accrual was credited to the member's account for balance composition and it will be part of the next billing file.
  • trace:
    • UUID correlationId: correlation identifier code indicated by the partner or, if not indicated, generated by LATAM Pass for traceability purposes;
    • UUID threadId: LATAM Pass code that identifies the transaction chain throughout the accrual process;
    • DateTime receivedDateTime: date and time when the accrual request was received;
    • DateTime returnedDateTime: date and time when the accrual request was responded to.
  • error:
    • Integer code: error code;
    • String message: error message description;
    • String instructions: instructions to be followed by the partner when facing the error;
    • DateTime issuedDateTime: date and time when the error was generated;
    • details:
      • String key: key that details the error;
      • String value: value that details the error.

Reasons for a request to be rejected

ReasonCodeMessageInstructions to Partner
The activity date with the partner, at the time of the accrual request, was in the future. (partnerOriginalDateTime)101ActivityDateGreater ThanCurrentDateValidate your request because some date is greater than current date
Partner identification code not registered. (partnerId)108PartnerDoesNotExistPartner doesn't exist. Please contact our LATAM team to set up the necessary configurations.
Product identification code not registered or not linked to the partner or expired at the time of accrual request. (productId)110IACODAccrual code is expired or invalid
Invalid program for the member's country of residence. (ffn)111CCIE - Invalid country of residenceInvalid program. Please contact our LATAM team to set up the necessary configurations.
Member not found with the informed data (ffn,document), but e-mail address associated to another account that already exists (email).112DuplicateMemberProfiles ExistsAsPerAlgorithmMember: Contact LATAM to update your data
Member identification code (ffn) is invalid for their country of residence (residenceCountryCode).113Incorrect CPF format validated by the Core SystemFix the CPF number
Member with an invalid account status for accrual. (ffn)114Invalid member statusMember: Contact LATAM to update your data
Unable to process accrual request for the member. (ffn,document)204Member already existsMember: Contact LATAM to update your data
Member identification code (ffn) is invalid for their country of residence (residenceCountryCode).205Incorrect CPF format validated by the Core SystemFix the CPF number
Unable to process accrual request for the member. (ffn,document)206Member already existsMember: Contact LATAM to update your data

Notification examples

Granted accrual

curl --request POST \
  --url https://partner-server-url/ \
  --header 'Content-Type: application/json' \
  --data '{
	"nonAirAccrual": {
		"ffn": "12345678912",
		"latamAccrualId": "BCS12345_6",
		"status": "PROCESSED"
	},
	"trace": {
		"correlationId": "f050f11e-b05b-499d-ae13-154efc091ef4",
		"threadId": "39fd0a13-b76a-445c-875c-01595eb6f577",
		"receivedDateTime": "2024-11-01 12:14:54.510+0000",
		"returnedDateTime": "2024-11-01 12:14:54.553+0000"
	}
}'

Rejected request

curl --request POST \
  --url https://partner-server-url/ \
  --header 'Content-Type: application/json' \
  --data '{
	"nonAirAccrual": {
		"ffn": "11111111111",
		"status": "CANCELLED"
	},
	"trace": {
		"correlationId": "f050f11e-b05b-499d-ae13-154efc091ef4",
		"threadId": "39fd0a13-b76a-445c-875c-01595eb6f577",
		"receivedDateTime": "2024-11-01 12:14:54.510+0000",
		"returnedDateTime": "2024-11-01 12:14:54.553+0000"
	},
	"error": {
		"code": 108,
		"message": "PartnerDoesNotExist",
		"instructions": "Partner doesn't exist.
Please contact our LATAM team to set up the necessary configurations.",
		"issuedDateTime": "2024-11-01 12:14:54.510+0000",
		"details": null
	}
}'