@gojinko/api-client 2.14.0 → 2.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/tools.d.ts +23 -4
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +26 -0
- package/dist/tools.js.map +1 -1
- package/dist/types/devplatform.d.ts +43 -7
- package/dist/types/devplatform.d.ts.map +1 -1
- package/dist/types/devplatform.js +1 -1
- package/dist/types/generated.d.ts +651 -20
- package/dist/types/generated.d.ts.map +1 -1
- package/package.json +1 -1
- package/public-api.yaml +544 -38
package/public-api.yaml
CHANGED
|
@@ -14,6 +14,56 @@ components:
|
|
|
14
14
|
type: http
|
|
15
15
|
scheme: bearer
|
|
16
16
|
schemas:
|
|
17
|
+
AgentPaymentSubmitRequest:
|
|
18
|
+
type: object
|
|
19
|
+
properties:
|
|
20
|
+
trip_id:
|
|
21
|
+
type: string
|
|
22
|
+
example: trip_1048576
|
|
23
|
+
shared_payment_token:
|
|
24
|
+
type: string
|
|
25
|
+
example: spt_1Nq8L2eZvKYlo2C0
|
|
26
|
+
required:
|
|
27
|
+
- trip_id
|
|
28
|
+
- shared_payment_token
|
|
29
|
+
AgentPaymentSubmitResponse:
|
|
30
|
+
type: object
|
|
31
|
+
properties:
|
|
32
|
+
fulfillment_cart_id:
|
|
33
|
+
type: integer
|
|
34
|
+
status:
|
|
35
|
+
type: string
|
|
36
|
+
example: processing
|
|
37
|
+
payment_verified:
|
|
38
|
+
type: boolean
|
|
39
|
+
message:
|
|
40
|
+
type: string
|
|
41
|
+
checkout_url:
|
|
42
|
+
type: string
|
|
43
|
+
description: Hosted-checkout fallback, present only on a 3DS step-up / decline.
|
|
44
|
+
recap_token:
|
|
45
|
+
type: string
|
|
46
|
+
AgentSPTParams:
|
|
47
|
+
type: object
|
|
48
|
+
properties:
|
|
49
|
+
max_amount:
|
|
50
|
+
type: integer
|
|
51
|
+
description: Locked cart total in the smallest currency unit — scope the Shared
|
|
52
|
+
Payment Token to at most this.
|
|
53
|
+
example: 259449
|
|
54
|
+
currency:
|
|
55
|
+
type: string
|
|
56
|
+
example: EUR
|
|
57
|
+
stripe_profile:
|
|
58
|
+
type: string
|
|
59
|
+
description: Stripe Agentic Commerce network_business_profile id the SPT is
|
|
60
|
+
granted against. Empty until the preview account is provisioned.
|
|
61
|
+
expires_at:
|
|
62
|
+
type: string
|
|
63
|
+
example: 2026-06-10T13:04:56Z
|
|
64
|
+
required:
|
|
65
|
+
- max_amount
|
|
66
|
+
- currency
|
|
17
67
|
AncillaryOffer:
|
|
18
68
|
type: object
|
|
19
69
|
description: A purchasable ancillary (bag, seat, bundle, ...) offered on a trip item.
|
|
@@ -51,6 +101,49 @@ components:
|
|
|
51
101
|
type: integer
|
|
52
102
|
required:
|
|
53
103
|
- offer_id
|
|
104
|
+
CheckoutRequest:
|
|
105
|
+
type: object
|
|
106
|
+
properties:
|
|
107
|
+
trip_id:
|
|
108
|
+
type: string
|
|
109
|
+
example: trip_1048576
|
|
110
|
+
required:
|
|
111
|
+
- trip_id
|
|
112
|
+
CheckoutResponse:
|
|
113
|
+
type: object
|
|
114
|
+
properties:
|
|
115
|
+
session_id:
|
|
116
|
+
type: string
|
|
117
|
+
example: cs_1048576
|
|
118
|
+
checkout_url:
|
|
119
|
+
type: string
|
|
120
|
+
example: https://book.gojinko.com/checkout?sid=1048576
|
|
121
|
+
status:
|
|
122
|
+
type: string
|
|
123
|
+
example: pending_payment
|
|
124
|
+
expires_at:
|
|
125
|
+
type: string
|
|
126
|
+
example: 2026-06-01T13:04:56Z
|
|
127
|
+
total_amount:
|
|
128
|
+
type: object
|
|
129
|
+
properties:
|
|
130
|
+
amount:
|
|
131
|
+
type: number
|
|
132
|
+
example: 318.4
|
|
133
|
+
value:
|
|
134
|
+
type: number
|
|
135
|
+
currency:
|
|
136
|
+
type: string
|
|
137
|
+
example: USD
|
|
138
|
+
decimal_places:
|
|
139
|
+
type: integer
|
|
140
|
+
example: 2
|
|
141
|
+
items:
|
|
142
|
+
type: array
|
|
143
|
+
items:
|
|
144
|
+
nullable: true
|
|
145
|
+
agent_spt_params:
|
|
146
|
+
$ref: "#/components/schemas/AgentSPTParams"
|
|
54
147
|
HealthResponse:
|
|
55
148
|
type: object
|
|
56
149
|
properties:
|
|
@@ -911,39 +1004,6 @@ components:
|
|
|
911
1004
|
- trip_id
|
|
912
1005
|
- item_id
|
|
913
1006
|
- selections
|
|
914
|
-
BookResponse:
|
|
915
|
-
type: object
|
|
916
|
-
properties:
|
|
917
|
-
session_id:
|
|
918
|
-
type: string
|
|
919
|
-
checkout_url:
|
|
920
|
-
type: string
|
|
921
|
-
status:
|
|
922
|
-
type: string
|
|
923
|
-
expires_at:
|
|
924
|
-
type: string
|
|
925
|
-
total_amount:
|
|
926
|
-
type: object
|
|
927
|
-
properties:
|
|
928
|
-
amount:
|
|
929
|
-
type: number
|
|
930
|
-
value:
|
|
931
|
-
type: number
|
|
932
|
-
currency:
|
|
933
|
-
type: string
|
|
934
|
-
decimal_places:
|
|
935
|
-
type: integer
|
|
936
|
-
items:
|
|
937
|
-
type: array
|
|
938
|
-
items:
|
|
939
|
-
nullable: true
|
|
940
|
-
BookRequest:
|
|
941
|
-
type: object
|
|
942
|
-
properties:
|
|
943
|
-
trip_id:
|
|
944
|
-
type: string
|
|
945
|
-
required:
|
|
946
|
-
- trip_id
|
|
947
1007
|
HotelSearchResponse:
|
|
948
1008
|
type: object
|
|
949
1009
|
properties:
|
|
@@ -1510,8 +1570,275 @@ components:
|
|
|
1510
1570
|
type: string
|
|
1511
1571
|
last_name:
|
|
1512
1572
|
type: string
|
|
1513
|
-
|
|
1573
|
+
AnalysisType:
|
|
1574
|
+
type: string
|
|
1575
|
+
enum: [snapshot, trend]
|
|
1576
|
+
TravelPeriod:
|
|
1577
|
+
type: string
|
|
1578
|
+
enum: [Summer, Winter, Christmas, Easter, Next30Days, Next90Days, Custom]
|
|
1579
|
+
TravelerType:
|
|
1580
|
+
type: string
|
|
1581
|
+
enum: [Solo, Couple, Group, Family]
|
|
1582
|
+
TripType:
|
|
1583
|
+
type: string
|
|
1584
|
+
enum: [One-Way, Round-Trip]
|
|
1585
|
+
DestinationRow:
|
|
1586
|
+
type: object
|
|
1587
|
+
required: [destination]
|
|
1588
|
+
properties:
|
|
1589
|
+
rank:
|
|
1590
|
+
type: integer
|
|
1591
|
+
destination:
|
|
1592
|
+
type: string
|
|
1593
|
+
share:
|
|
1594
|
+
type: number
|
|
1595
|
+
format: double
|
|
1596
|
+
MarketRow:
|
|
1597
|
+
type: object
|
|
1598
|
+
required: [market]
|
|
1599
|
+
properties:
|
|
1600
|
+
rank:
|
|
1601
|
+
type: integer
|
|
1602
|
+
market:
|
|
1603
|
+
type: string
|
|
1604
|
+
share:
|
|
1605
|
+
type: number
|
|
1606
|
+
format: double
|
|
1607
|
+
AudienceRow:
|
|
1608
|
+
type: object
|
|
1609
|
+
required: [audience]
|
|
1610
|
+
properties:
|
|
1611
|
+
rank:
|
|
1612
|
+
type: integer
|
|
1613
|
+
audience:
|
|
1614
|
+
type: string
|
|
1615
|
+
share:
|
|
1616
|
+
type: number
|
|
1617
|
+
format: double
|
|
1618
|
+
DestinationResponse:
|
|
1619
|
+
type: object
|
|
1620
|
+
required: [analysis_type, rows]
|
|
1621
|
+
properties:
|
|
1622
|
+
analysis_type:
|
|
1623
|
+
$ref: "#/components/schemas/AnalysisType"
|
|
1624
|
+
rows:
|
|
1625
|
+
type: array
|
|
1626
|
+
items:
|
|
1627
|
+
$ref: "#/components/schemas/DestinationRow"
|
|
1628
|
+
MarketResponse:
|
|
1629
|
+
type: object
|
|
1630
|
+
required: [analysis_type, rows]
|
|
1631
|
+
properties:
|
|
1632
|
+
analysis_type:
|
|
1633
|
+
$ref: "#/components/schemas/AnalysisType"
|
|
1634
|
+
rows:
|
|
1635
|
+
type: array
|
|
1636
|
+
items:
|
|
1637
|
+
$ref: "#/components/schemas/MarketRow"
|
|
1638
|
+
AudienceResponse:
|
|
1639
|
+
type: object
|
|
1640
|
+
required: [analysis_type, rows]
|
|
1641
|
+
properties:
|
|
1642
|
+
analysis_type:
|
|
1643
|
+
$ref: "#/components/schemas/AnalysisType"
|
|
1644
|
+
rows:
|
|
1645
|
+
type: array
|
|
1646
|
+
items:
|
|
1647
|
+
$ref: "#/components/schemas/AudienceRow"
|
|
1648
|
+
parameters:
|
|
1649
|
+
analysis:
|
|
1650
|
+
name: analysis
|
|
1651
|
+
in: query
|
|
1652
|
+
required: true
|
|
1653
|
+
description: Analysis mode. `trend` is accepted but currently returns snapshot-shaped data.
|
|
1654
|
+
schema:
|
|
1655
|
+
$ref: "#/components/schemas/AnalysisType"
|
|
1656
|
+
originMarket:
|
|
1657
|
+
name: origin_market
|
|
1658
|
+
in: query
|
|
1659
|
+
required: false
|
|
1660
|
+
description: "Origin market filter as <Level>:<Code>, e.g. Country:US or City:NYC."
|
|
1661
|
+
schema:
|
|
1662
|
+
type: string
|
|
1663
|
+
destinationFilter:
|
|
1664
|
+
name: destination
|
|
1665
|
+
in: query
|
|
1666
|
+
required: false
|
|
1667
|
+
description: "Optional destination filter as <Level>:<Code>, e.g. Country:TH."
|
|
1668
|
+
schema:
|
|
1669
|
+
type: string
|
|
1670
|
+
destinationRequired:
|
|
1671
|
+
name: destination
|
|
1672
|
+
in: query
|
|
1673
|
+
required: true
|
|
1674
|
+
description: "Destination as <Level>:<Code>, e.g. Country:TH. Required for this endpoint."
|
|
1675
|
+
schema:
|
|
1676
|
+
type: string
|
|
1677
|
+
travelPeriod:
|
|
1678
|
+
name: travel_period
|
|
1679
|
+
in: query
|
|
1680
|
+
required: false
|
|
1681
|
+
description: Named departure window (defaults to Next90Days server-side).
|
|
1682
|
+
schema:
|
|
1683
|
+
$ref: "#/components/schemas/TravelPeriod"
|
|
1684
|
+
departureDateFrom:
|
|
1685
|
+
name: departure_date_from
|
|
1686
|
+
in: query
|
|
1687
|
+
required: false
|
|
1688
|
+
description: "Start of departure window (YYYY-MM-DD). Required when travel_period=Custom."
|
|
1689
|
+
schema:
|
|
1690
|
+
type: string
|
|
1691
|
+
format: date
|
|
1692
|
+
departureDateTo:
|
|
1693
|
+
name: departure_date_to
|
|
1694
|
+
in: query
|
|
1695
|
+
required: false
|
|
1696
|
+
description: "End of departure window (YYYY-MM-DD). Required when travel_period=Custom."
|
|
1697
|
+
schema:
|
|
1698
|
+
type: string
|
|
1699
|
+
format: date
|
|
1700
|
+
travelerType:
|
|
1701
|
+
name: traveler_type
|
|
1702
|
+
in: query
|
|
1703
|
+
required: false
|
|
1704
|
+
description: Optional traveler-type filter.
|
|
1705
|
+
schema:
|
|
1706
|
+
$ref: "#/components/schemas/TravelerType"
|
|
1707
|
+
tripType:
|
|
1708
|
+
name: trip_type
|
|
1709
|
+
in: query
|
|
1710
|
+
required: false
|
|
1711
|
+
description: Optional trip-type filter.
|
|
1712
|
+
schema:
|
|
1713
|
+
$ref: "#/components/schemas/TripType"
|
|
1714
|
+
limit:
|
|
1715
|
+
name: limit
|
|
1716
|
+
in: query
|
|
1717
|
+
required: false
|
|
1718
|
+
description: Max rows (1-200, default 20).
|
|
1719
|
+
schema:
|
|
1720
|
+
type: integer
|
|
1721
|
+
minimum: 1
|
|
1722
|
+
maximum: 200
|
|
1723
|
+
default: 20
|
|
1514
1724
|
paths:
|
|
1725
|
+
/v1/destination:
|
|
1726
|
+
get:
|
|
1727
|
+
tags:
|
|
1728
|
+
- demand
|
|
1729
|
+
summary: Top destinations by search demand
|
|
1730
|
+
description: >-
|
|
1731
|
+
Most-searched destinations by de-sampled request share. `destination` is optional
|
|
1732
|
+
(omit to rank all destinations); set `origin_market` to scope to one source market.
|
|
1733
|
+
security:
|
|
1734
|
+
- ApiKeyAuth: []
|
|
1735
|
+
- BearerAuth: []
|
|
1736
|
+
parameters:
|
|
1737
|
+
- $ref: "#/components/parameters/analysis"
|
|
1738
|
+
- $ref: "#/components/parameters/originMarket"
|
|
1739
|
+
- $ref: "#/components/parameters/destinationFilter"
|
|
1740
|
+
- $ref: "#/components/parameters/travelPeriod"
|
|
1741
|
+
- $ref: "#/components/parameters/departureDateFrom"
|
|
1742
|
+
- $ref: "#/components/parameters/departureDateTo"
|
|
1743
|
+
- $ref: "#/components/parameters/travelerType"
|
|
1744
|
+
- $ref: "#/components/parameters/tripType"
|
|
1745
|
+
- $ref: "#/components/parameters/limit"
|
|
1746
|
+
responses:
|
|
1747
|
+
"200":
|
|
1748
|
+
description: OK
|
|
1749
|
+
content:
|
|
1750
|
+
application/json:
|
|
1751
|
+
schema:
|
|
1752
|
+
$ref: "#/components/schemas/DestinationResponse"
|
|
1753
|
+
"401":
|
|
1754
|
+
description: Authentication required
|
|
1755
|
+
content:
|
|
1756
|
+
application/json:
|
|
1757
|
+
schema:
|
|
1758
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1759
|
+
"422":
|
|
1760
|
+
description: Validation error
|
|
1761
|
+
content:
|
|
1762
|
+
application/json:
|
|
1763
|
+
schema:
|
|
1764
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1765
|
+
/v1/market:
|
|
1766
|
+
get:
|
|
1767
|
+
tags:
|
|
1768
|
+
- demand
|
|
1769
|
+
summary: Top source markets for a destination
|
|
1770
|
+
description: Which source markets generate the most demand for a given destination.
|
|
1771
|
+
security:
|
|
1772
|
+
- ApiKeyAuth: []
|
|
1773
|
+
- BearerAuth: []
|
|
1774
|
+
parameters:
|
|
1775
|
+
- $ref: "#/components/parameters/analysis"
|
|
1776
|
+
- $ref: "#/components/parameters/destinationRequired"
|
|
1777
|
+
- $ref: "#/components/parameters/originMarket"
|
|
1778
|
+
- $ref: "#/components/parameters/travelPeriod"
|
|
1779
|
+
- $ref: "#/components/parameters/departureDateFrom"
|
|
1780
|
+
- $ref: "#/components/parameters/departureDateTo"
|
|
1781
|
+
- $ref: "#/components/parameters/travelerType"
|
|
1782
|
+
- $ref: "#/components/parameters/tripType"
|
|
1783
|
+
- $ref: "#/components/parameters/limit"
|
|
1784
|
+
responses:
|
|
1785
|
+
"200":
|
|
1786
|
+
description: OK
|
|
1787
|
+
content:
|
|
1788
|
+
application/json:
|
|
1789
|
+
schema:
|
|
1790
|
+
$ref: "#/components/schemas/MarketResponse"
|
|
1791
|
+
"401":
|
|
1792
|
+
description: Authentication required
|
|
1793
|
+
content:
|
|
1794
|
+
application/json:
|
|
1795
|
+
schema:
|
|
1796
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1797
|
+
"422":
|
|
1798
|
+
description: Validation error
|
|
1799
|
+
content:
|
|
1800
|
+
application/json:
|
|
1801
|
+
schema:
|
|
1802
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1803
|
+
/v1/audience:
|
|
1804
|
+
get:
|
|
1805
|
+
tags:
|
|
1806
|
+
- demand
|
|
1807
|
+
summary: Traveler-type mix for a destination
|
|
1808
|
+
description: >-
|
|
1809
|
+
Traveler-type composition (Solo / Couple / Family / Group) of demand for a destination.
|
|
1810
|
+
`traveler_type` is not a valid filter here — this endpoint buckets by it.
|
|
1811
|
+
security:
|
|
1812
|
+
- ApiKeyAuth: []
|
|
1813
|
+
- BearerAuth: []
|
|
1814
|
+
parameters:
|
|
1815
|
+
- $ref: "#/components/parameters/analysis"
|
|
1816
|
+
- $ref: "#/components/parameters/destinationRequired"
|
|
1817
|
+
- $ref: "#/components/parameters/originMarket"
|
|
1818
|
+
- $ref: "#/components/parameters/travelPeriod"
|
|
1819
|
+
- $ref: "#/components/parameters/departureDateFrom"
|
|
1820
|
+
- $ref: "#/components/parameters/departureDateTo"
|
|
1821
|
+
- $ref: "#/components/parameters/tripType"
|
|
1822
|
+
- $ref: "#/components/parameters/limit"
|
|
1823
|
+
responses:
|
|
1824
|
+
"200":
|
|
1825
|
+
description: OK
|
|
1826
|
+
content:
|
|
1827
|
+
application/json:
|
|
1828
|
+
schema:
|
|
1829
|
+
$ref: "#/components/schemas/AudienceResponse"
|
|
1830
|
+
"401":
|
|
1831
|
+
description: Authentication required
|
|
1832
|
+
content:
|
|
1833
|
+
application/json:
|
|
1834
|
+
schema:
|
|
1835
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1836
|
+
"422":
|
|
1837
|
+
description: Validation error
|
|
1838
|
+
content:
|
|
1839
|
+
application/json:
|
|
1840
|
+
schema:
|
|
1841
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1515
1842
|
/health:
|
|
1516
1843
|
get:
|
|
1517
1844
|
tags:
|
|
@@ -1524,6 +1851,159 @@ paths:
|
|
|
1524
1851
|
application/json:
|
|
1525
1852
|
schema:
|
|
1526
1853
|
$ref: "#/components/schemas/HealthResponse"
|
|
1854
|
+
/v1/agent_payment/submit:
|
|
1855
|
+
post:
|
|
1856
|
+
tags:
|
|
1857
|
+
- Pricing & booking
|
|
1858
|
+
summary: Submit an agent payment — present trip_id + a Shared Payment Token to
|
|
1859
|
+
schedule + authorize the booking; returns a checkout_url fallback if
|
|
1860
|
+
customer action (3DS) is required
|
|
1861
|
+
security:
|
|
1862
|
+
- ApiKeyAuth: []
|
|
1863
|
+
- BearerAuth: []
|
|
1864
|
+
requestBody:
|
|
1865
|
+
content:
|
|
1866
|
+
application/json:
|
|
1867
|
+
schema:
|
|
1868
|
+
$ref: "#/components/schemas/AgentPaymentSubmitRequest"
|
|
1869
|
+
responses:
|
|
1870
|
+
"200":
|
|
1871
|
+
description: Authorization result
|
|
1872
|
+
content:
|
|
1873
|
+
application/json:
|
|
1874
|
+
schema:
|
|
1875
|
+
$ref: "#/components/schemas/AgentPaymentSubmitResponse"
|
|
1876
|
+
"400":
|
|
1877
|
+
description: Bad request
|
|
1878
|
+
content:
|
|
1879
|
+
application/json:
|
|
1880
|
+
schema:
|
|
1881
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1882
|
+
example:
|
|
1883
|
+
error:
|
|
1884
|
+
code: BAD_REQUEST
|
|
1885
|
+
message: Malformed JSON in request body.
|
|
1886
|
+
doc_url: https://docs.gojinko.com/concepts/errors
|
|
1887
|
+
"401":
|
|
1888
|
+
description: Authentication required
|
|
1889
|
+
content:
|
|
1890
|
+
application/json:
|
|
1891
|
+
schema:
|
|
1892
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1893
|
+
example:
|
|
1894
|
+
error:
|
|
1895
|
+
code: AUTH_REQUIRED
|
|
1896
|
+
message: Invalid or expired API key.
|
|
1897
|
+
doc_url: https://docs.gojinko.com/api-reference/authentication
|
|
1898
|
+
"422":
|
|
1899
|
+
description: Validation error
|
|
1900
|
+
content:
|
|
1901
|
+
application/json:
|
|
1902
|
+
schema:
|
|
1903
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1904
|
+
example:
|
|
1905
|
+
error:
|
|
1906
|
+
code: BAD_REQUEST
|
|
1907
|
+
message: "origins: origins is required; trip_type: trip_type is required"
|
|
1908
|
+
doc_url: https://docs.gojinko.com/concepts/errors
|
|
1909
|
+
"429":
|
|
1910
|
+
description: Rate limit or quota exceeded
|
|
1911
|
+
content:
|
|
1912
|
+
application/json:
|
|
1913
|
+
schema:
|
|
1914
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1915
|
+
example:
|
|
1916
|
+
error:
|
|
1917
|
+
code: RATE_LIMITED
|
|
1918
|
+
message: Rate limit or quota exceeded.
|
|
1919
|
+
doc_url: https://docs.gojinko.com/concepts/errors
|
|
1920
|
+
"502":
|
|
1921
|
+
description: Upstream service error
|
|
1922
|
+
content:
|
|
1923
|
+
application/json:
|
|
1924
|
+
schema:
|
|
1925
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1926
|
+
example:
|
|
1927
|
+
error:
|
|
1928
|
+
code: UPSTREAM_ERROR
|
|
1929
|
+
message: Upstream travel provider returned an error. Please retry.
|
|
1930
|
+
doc_url: https://docs.gojinko.com/concepts/errors
|
|
1931
|
+
/v1/checkout:
|
|
1932
|
+
post:
|
|
1933
|
+
tags:
|
|
1934
|
+
- Pricing & booking
|
|
1935
|
+
summary: Checkout a trip — returns a checkout URL the user opens to pay, plus
|
|
1936
|
+
the Shared Payment Token params an agent can use to pay programmatically
|
|
1937
|
+
security:
|
|
1938
|
+
- ApiKeyAuth: []
|
|
1939
|
+
- BearerAuth: []
|
|
1940
|
+
requestBody:
|
|
1941
|
+
content:
|
|
1942
|
+
application/json:
|
|
1943
|
+
schema:
|
|
1944
|
+
$ref: "#/components/schemas/CheckoutRequest"
|
|
1945
|
+
responses:
|
|
1946
|
+
"200":
|
|
1947
|
+
description: Checkout session
|
|
1948
|
+
content:
|
|
1949
|
+
application/json:
|
|
1950
|
+
schema:
|
|
1951
|
+
$ref: "#/components/schemas/CheckoutResponse"
|
|
1952
|
+
"400":
|
|
1953
|
+
description: Bad request
|
|
1954
|
+
content:
|
|
1955
|
+
application/json:
|
|
1956
|
+
schema:
|
|
1957
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1958
|
+
example:
|
|
1959
|
+
error:
|
|
1960
|
+
code: BAD_REQUEST
|
|
1961
|
+
message: Malformed JSON in request body.
|
|
1962
|
+
doc_url: https://docs.gojinko.com/concepts/errors
|
|
1963
|
+
"401":
|
|
1964
|
+
description: Authentication required
|
|
1965
|
+
content:
|
|
1966
|
+
application/json:
|
|
1967
|
+
schema:
|
|
1968
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1969
|
+
example:
|
|
1970
|
+
error:
|
|
1971
|
+
code: AUTH_REQUIRED
|
|
1972
|
+
message: Invalid or expired API key.
|
|
1973
|
+
doc_url: https://docs.gojinko.com/api-reference/authentication
|
|
1974
|
+
"422":
|
|
1975
|
+
description: Validation error
|
|
1976
|
+
content:
|
|
1977
|
+
application/json:
|
|
1978
|
+
schema:
|
|
1979
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1980
|
+
example:
|
|
1981
|
+
error:
|
|
1982
|
+
code: BAD_REQUEST
|
|
1983
|
+
message: "origins: origins is required; trip_type: trip_type is required"
|
|
1984
|
+
doc_url: https://docs.gojinko.com/concepts/errors
|
|
1985
|
+
"429":
|
|
1986
|
+
description: Rate limit or quota exceeded
|
|
1987
|
+
content:
|
|
1988
|
+
application/json:
|
|
1989
|
+
schema:
|
|
1990
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1991
|
+
example:
|
|
1992
|
+
error:
|
|
1993
|
+
code: RATE_LIMITED
|
|
1994
|
+
message: Rate limit or quota exceeded.
|
|
1995
|
+
doc_url: https://docs.gojinko.com/concepts/errors
|
|
1996
|
+
"502":
|
|
1997
|
+
description: Upstream service error
|
|
1998
|
+
content:
|
|
1999
|
+
application/json:
|
|
2000
|
+
schema:
|
|
2001
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
2002
|
+
example:
|
|
2003
|
+
error:
|
|
2004
|
+
code: UPSTREAM_ERROR
|
|
2005
|
+
message: Upstream travel provider returned an error. Please retry.
|
|
2006
|
+
doc_url: https://docs.gojinko.com/concepts/errors
|
|
1527
2007
|
/v1/find_destination:
|
|
1528
2008
|
post:
|
|
1529
2009
|
tags:
|
|
@@ -2044,8 +2524,9 @@ paths:
|
|
|
2044
2524
|
/v1/book:
|
|
2045
2525
|
post:
|
|
2046
2526
|
tags:
|
|
2047
|
-
-
|
|
2048
|
-
summary:
|
|
2527
|
+
- Pricing & booking
|
|
2528
|
+
summary: DEPRECATED — use /checkout. Alias retained for backward compatibility.
|
|
2529
|
+
deprecated: true
|
|
2049
2530
|
security:
|
|
2050
2531
|
- ApiKeyAuth: []
|
|
2051
2532
|
- BearerAuth: []
|
|
@@ -2053,44 +2534,69 @@ paths:
|
|
|
2053
2534
|
content:
|
|
2054
2535
|
application/json:
|
|
2055
2536
|
schema:
|
|
2056
|
-
$ref: "#/components/schemas/
|
|
2537
|
+
$ref: "#/components/schemas/CheckoutRequest"
|
|
2057
2538
|
responses:
|
|
2058
2539
|
"200":
|
|
2059
2540
|
description: Checkout session
|
|
2060
2541
|
content:
|
|
2061
2542
|
application/json:
|
|
2062
2543
|
schema:
|
|
2063
|
-
$ref: "#/components/schemas/
|
|
2544
|
+
$ref: "#/components/schemas/CheckoutResponse"
|
|
2064
2545
|
"400":
|
|
2065
2546
|
description: Bad request
|
|
2066
2547
|
content:
|
|
2067
2548
|
application/json:
|
|
2068
2549
|
schema:
|
|
2069
2550
|
$ref: "#/components/schemas/ErrorResponse"
|
|
2551
|
+
example:
|
|
2552
|
+
error:
|
|
2553
|
+
code: BAD_REQUEST
|
|
2554
|
+
message: Malformed JSON in request body.
|
|
2555
|
+
doc_url: https://docs.gojinko.com/concepts/errors
|
|
2070
2556
|
"401":
|
|
2071
2557
|
description: Authentication required
|
|
2072
2558
|
content:
|
|
2073
2559
|
application/json:
|
|
2074
2560
|
schema:
|
|
2075
2561
|
$ref: "#/components/schemas/ErrorResponse"
|
|
2562
|
+
example:
|
|
2563
|
+
error:
|
|
2564
|
+
code: AUTH_REQUIRED
|
|
2565
|
+
message: Invalid or expired API key.
|
|
2566
|
+
doc_url: https://docs.gojinko.com/api-reference/authentication
|
|
2076
2567
|
"422":
|
|
2077
2568
|
description: Validation error
|
|
2078
2569
|
content:
|
|
2079
2570
|
application/json:
|
|
2080
2571
|
schema:
|
|
2081
2572
|
$ref: "#/components/schemas/ErrorResponse"
|
|
2573
|
+
example:
|
|
2574
|
+
error:
|
|
2575
|
+
code: BAD_REQUEST
|
|
2576
|
+
message: "origins: origins is required; trip_type: trip_type is required"
|
|
2577
|
+
doc_url: https://docs.gojinko.com/concepts/errors
|
|
2082
2578
|
"429":
|
|
2083
2579
|
description: Rate limit or quota exceeded
|
|
2084
2580
|
content:
|
|
2085
2581
|
application/json:
|
|
2086
2582
|
schema:
|
|
2087
2583
|
$ref: "#/components/schemas/ErrorResponse"
|
|
2584
|
+
example:
|
|
2585
|
+
error:
|
|
2586
|
+
code: RATE_LIMITED
|
|
2587
|
+
message: Rate limit or quota exceeded.
|
|
2588
|
+
doc_url: https://docs.gojinko.com/concepts/errors
|
|
2088
2589
|
"502":
|
|
2089
2590
|
description: Upstream service error
|
|
2090
2591
|
content:
|
|
2091
2592
|
application/json:
|
|
2092
2593
|
schema:
|
|
2093
2594
|
$ref: "#/components/schemas/ErrorResponse"
|
|
2595
|
+
example:
|
|
2596
|
+
error:
|
|
2597
|
+
code: UPSTREAM_ERROR
|
|
2598
|
+
message: Upstream travel provider returned an error. Please retry.
|
|
2599
|
+
doc_url: https://docs.gojinko.com/concepts/errors
|
|
2094
2600
|
/v1/hotel_search:
|
|
2095
2601
|
post:
|
|
2096
2602
|
tags:
|