Skip to content

Event

It allows the creation of events and later check their status.

Base URL: https://app.payku.cl/ (Default server) · https://des.payku.cl/ (Sandbox server)
POST/api/event

This method allows you to create an event and receive the event details as a response.

Request body

ParameterTypeDescription
eventrequired string

Event id.

maximum 40 characters
Example: 98374
namerequired string

Event name.

maximum 400 characters
Example: Event
date_eventrequired datetime

Date on which the event will take place.

Example: 2020-12-20
date_closing_salesrequired datetime

Sales closing date, must be less than or equal to date_event.

Example: 2020-12-19 23:59:00
date_paymentrequired datetime

Payment date of the event, must be greater than the date_event date.

Example: 2020-12-20
url_event string <url>

url where the event is published.

maximum 240 characters
Example: https://example.cl/event1
url_logo string <url>

url of the logo that identifies the event.

maximum 240 characters
Example: https://example.cl/logo_event1.png
service_sale integer

Amount of the sales service, belongs to the amount that the owner of the account will receive per transaction.

maximum 7 characters
Example: 10
affiliation array of objects

Distribution of beneficiaries.

email string

Beneficiary email.

maximum 50 characters
percent number

Percentage which corresponds to the beneficiary.

maximum 6 characters
Example: 100
curl -X POST \
https://BASE_URL/api/event \
-H 'Accept: application/json, text/plain, */*' \
-H 'Authorization: Bearer TOKEN_PUBLICO' \
-H 'Content-Type: application/json' \
-H 'Host: BASE_URL' \
-d {
"name": "Event",
"event": "98374",
"date_event": "2020-12-20",
"date_payment": "2020-12-22",
"date_closing_sales": "2020-12-19 23:59:00",
"url_logo": "https://example.cl/logo_event1.png",
"url_event": "https://example.cl/event1",
"service_sale": 10,
"affiliation": [
]
}'

Responses

200
{
"status": "success",
"id": "98374",
"event": "Event",
"date_event": "2020-12-20",
"date_payment": "2020-12-22",
"date_closing_sales": "2020-12-19 23:59:00",
"url_logo": "https://example.cl/logo_event1.png",
"url_event": "https://example.cl/event1",
"distribution": {
"affiliate": "100.00",
"service_sale": "10.00"
},
"affiliation": {
"id": "b99dfd8193ebfd37d4b9",
"email": "[email protected]",
"percent": "100.00",
"status": "pending"
},
"paymentData": {
"count": 0,
"amount_general": 0,
"amount_affiliate": 0,
"fee": 0,
"balance": 0
}
}
Response fields
ParameterTypeDescription
status string

Request status.

Example: success
id string

Event id.

Example: 98374
event string

Event name.

Example: Event
date_event datetime

Date on which the event will take place.

Example: 2020-12-20
date_payment datetime

Payment date of the event, must be greater than the date_event date.

Example: 2020-12-22
date_closing_sales datetime

Sales closing date, must be less than or equal to date_event.

Example: 2020-12-19 23:59:00
url_logo string <url>

url that belongs to the event.

Example: https://example.cl/logo_event1.png
url_event string <url>

url where the event is published.

Example: https://example.cl/event1
distribution object

Distribution of transactions.

affiliate string

Amount to distribute to beneficiaries.

Example: 100.00
service_sale string

Amount to distribute in the sales service.

Example: 10.00
affiliation object

Affiliate information.

id string

Beneficiary identifier.

Example: b99dfd8193ebfd37d4b9
email string

Beneficiary email.

percent string

Percentage which corresponds to the beneficiary.

Example: 100.00
status string

Beneficiary status.

Example: pending
paymentData object

Distribution of beneficiaries.

count number

Sales quantity.

Example: 0
amount_general number

General amount of all transactions.

Example: 0
amount_affiliate number

Amount to distribute to beneficiaries.

Example: 0
fee number

Fee.

Example: 0
balance number

Amount to deposit.

Example: 0
GET/api/event/{idEvent}

This method allows obtaining the details of an event.

Path parameters

ParameterTypeDescription
idrequired string

id of the event to request

maximum 40 characters
curl -X GET \
https://BASE_URL/api/event \
-H 'Accept: application/json, text/plain, */*' \
-H 'Authorization: Bearer TOKEN_PUBLICO' \
-H 'Content-Type: application/json' \
-H 'Host: BASE_URL' \

Responses

200
{
"id": "98374",
"event": "Event",
"date_event": "2020-12-20",
"date_payment": "2020-12-22",
"date_closing_sales": "2020-12-19 23:59:00",
"url_logo": "https://example.cl/logo_event1.png",
"url_event": "https://example.cl/event1",
"distribution": {
"affiliate": "100.00",
"service_sale": "10.00"
},
"affiliation": {
"id": "b99dfd8193ebfd37d4b9",
"email": "[email protected]",
"percent": "100.00",
"status": "pending"
},
"paymentData": {
"count": 0,
"amount_general": 0,
"amount_affiliate": 0,
"fee": 0,
"balance": 0
}
}
Response fields
ParameterTypeDescription
id string

Event identifier.

Example: 98374
event string

Event name.

Example: Event
date_event datetime

Date on which the event will take place.

Example: 2020-12-20
date_payment datetime

Payment date of the event, must be greater than the date_event date.

Example: 2020-12-22
date_closing_sales datetime

Sales closing date, must be less than or equal to date_event.

Example: 2020-12-19 23:59:00
url_logo string <url>

url logo that belongs to the event.

Example: https://example.cl/logo_event1.png
url_event string <url>

url that belongs to the event.

Example: https://example.cl/event1
distribution object

Distribution of transactions.

affiliate string

Amount to distribute to beneficiaries.

Example: 100.00
service_sale string

Amount to distribute in the sales service.

Example: 10.00
affiliation object

Affiliate information.

id string

Beneficiary identifier.

Example: b99dfd8193ebfd37d4b9
email string

Beneficiary email.

percent string

Percentage which corresponds to the beneficiary.

Example: 100.00
status string

Beneficiary status.

Example: pending
paymentData object

Distribution of beneficiaries.

count number

Sales quantity.

Example: 0
amount_general number

General amount of all transactions.

Example: 0
amount_affiliate number

Amount to distribute to beneficiaries.

Example: 0
fee number

Fee.

Example: 0
balance number

Amount to deposit.

Example: 0