Buy Product Attraction

This method enables the creation and management of travel product bookings, providing essential details about the product, buyer, and customers.

A. Request Header

FieldFormatMandatoryLengthExample
Content-TypestringYapplication/json
Open-Api-Timestampyyyy-mm-dd'T'hh:mm:ss+07:00Y2024-02-07T10:28:35.000+07:0
Open-Api-SignatureDigital SignatureY88vNMoAmiDRV+paVyD5FaidgI5k
Ry2pCo8oEoQN/GBpIPuO3eicY
63b7xY0WDffScvkOZsZ1442ewa
bI7Wzd22pw==

B. Request Body

FieldTypeDescriptionRequiredExample
product_codestringUnique identifier for the producttrue“ATTO-03”
quantityintThe number of items or ticketstrue1
buyer_first_namestringFirst name of the buyertrue“Oim”
end_datestringEnd date of the event or bookingtrue"2024-07-26"
buyer_tel_numberstringTelephone number of the buyertrue"812959293"
buyer_last_namestringLast name of the buyertrue"Test"
buyer_tel_country_codestringCountry code for the buyer’s
telephone number
true"62"
emailstringEmail address of the buyertrue"oim@
yoipmail.com"
localestringLanguage preference or localetrue"en"
buyer_countrystringCountry code of the buyertrue"id"
booking_fieldArray of
Objects
Custom fields for booking
(key-value pairs)
keystringThe key for the custom fieldtrue"guideLang"
valuestringThe value for the custom fieldtrue"3b385b66-4cc1-
4ac8-bcfc 311b21fa64af"
event_timestringThe time when the event startstrue"09:30"
statestringThe state or the region code where the event takes placetrue"id"
customersArray of ObjectsDetails about the customers involved in the booking
customer_booking_fieldArray of ObjectsCustom fields for each customer
valuestringThe value for the customer fieldtrue"Test"
keystringThe key for the customer fieldtrue"englishLastName"
start_datestringThe start date of the event or bookingtrue"2024-07-26"
amountstringThe total amount charged for the bookingtrue"15083"
selling_pricestringThe selling price of the producttrue"16000"
partner_reference_idstringA unique reference ID for the partner transactiontrue"23432-756
45466"

C. Sample Request


{
  "product_code": "ATTO-03",
  "quantity": 1,
  "buyer_first_name": "Oim",
  "end_date": "2024-07-26",
  "buyer_tel_number": "812959293",
  "buyer_last_name": "Test",
  "buyer_tel_country_code": "62",
  "email": "[email protected]",
  "locale": "en",
  "buyer_country": "id",
  "booking_field": [
    {
      "key": "guideLang",
      "value": "3b385b66-4cc1-4ac8-bcfc-311b21fa64af"
    }
  ],
  "event_time": "09:30",
  "state": "id",
  "customers": [
    {
      "customer_booking_field": [
        {
          "value": "Test",
          "key": "englishLastName"
        },
        {
          "value": "Oim",
          "key": "englishFirstName"
        },
        {
            "value": "1996-08-16",
            "key": "birth"
        },
        {
            "value": "a2d9ee5e-2824-4239-b2d8-4f2d7ef6c338",
            "key": "nationality"
        },
        {
            "value": "testpassport",
            "key": "passportNo"
        }
      ]
    }
  ],
  "start_date": "2024-07-26",
  "amount": "15083",
  "selling_price": "16000",
  "partner_reference_id": "23432-75645466"
}

D. Response Body

FieldTypeDescriptionExample
response_codestringContains the OpenAPI response code“200062000”
response_messagestringContains the value of OpenAPI response message“Sukses”
data objectContains the metadata related to user list’s pagination
transaction_idstringThe unique identifier for the transaction“14429004”
statusstringThe value of transaction’s status“WAITING”
snstringThe value of transaction’s serial number“”

E. Sample Response

{
    "response_code": "200062000",
    "response_message": "Sukses",
    "data": {
        "transaction_id": "14429004",
        "status": "WAITING",
        "sn": ""
    }
}

Try It Here (Form)

To try the following endpoint, enter the example request data you want to use in the following form


Body Params
string
int32
string
string
string
string
string
string
string
string
booking_field
array of objects
booking_field
string
string
customers
array of objects
customers
string
string
string
string
Headers
date-time
string
Responses

Language
Credentials
OAuth2
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json