ver 1.0.0
- The WAUG PARTNER API is an API that has been released for the use of a series of functions provided by the WAUG service.
- The latest version of WAUG PARTNER API is v1.0.0.
- The request/response for WAUG PARTNER API is processed over HTTP/1.1, and all access must be HTTPS. The data transfer format is  JSON(JavaScript Object Notation), and UTF-8 for text encodings.
- WAUG Open API provides BETA environment and PRODUCTION environment.
- Commonly, the BETA environment is used with the purpose of testing in the process of development. Please note that this does not apply with PRODUCTION environment.
- Please check the following URLs for BETA environment and PRODUCTION environment.
JSON is used for sending and receiving data and its standard response format is as follows.
    {
        "responseCode": "000",
        "message": "this is message",
        "data": { //or [] },
        "count": 1,
        "version": "v1",
        "uri": "/v1/test",
        "service": "WAUG_PARTNER_API"
    }
                
Attribute Type Description
responseCode string A response code that expresses the status of the response. Please refer to “API Response Code” section below.
message string Response message
data object, array Response data. Expressed as a JSON object or JSON array.
count int Total response data count
version string WAUG PARTNER API version
uri string Requested URI
service string WAUG PARTNER API service name
Response code used for the "responseCode" attribute of the WAUG PARTNER API response standard format.
Category Code Description
Success 000
Failure 100 Invalid request
101 Invalid authentication
102 Invalid parameter
103 Data does not exist
104 There is not enough balance
105 Product information is modified
106 Invalid order information
107 This product is non-refundable
108 Response timed out
109 Price mismatch
110 Exceeded upload file max size
111 Exceeded api request rate limit
To use the WAUG PARTNER API, you need to create an account, Client Id, and Client Secret to obtain an authentication token.
Creating an account, Client Id, and Client Secret are currently processed through a separate procedure. Please contact the person in charge via email.
All requests, except for the function to issue authentication tokens, require authentication tokens, which are sent in addition to the Authorization header during the HTTP request header.
The process of issuing an authentication token is as follows.
1. Client Id and Client Secret for issuing authentication tokens are issued through a separate procedure.
2. Obtain authentication tokens through the authentication token issuing function of the WAUG PARTNER API. It is a request using Client Id and Client Secret following the basic method of HTTP authentication. Below is an example of using Curl.
ex)
curl -X POST -u {Client Id}:{Client Secret} {WAUG PARTNER API URL}/v1/token
                
The responses are as follows
ex)
{
    "accessToken": "ExampleTokenValue",
    "tokenType": "bearer",
    "expiresIn": "43199"
}
                    
3. Transmits the value of the "accessToken" attribute in the authentication token response by adding it to the Authorization header as follows
ex)
Authorization: Bearer ExampleTokenValue
                
The API request is limited to 100 times/10 seconds. The over requests will receive response code 111. This blocking is released by every 10 seconds.
example) request of 100 times /6 seconds(success) -> all requests receive 111 response for 4 seconds(blocked) -> request success
exception) request of reservation creation api
Currently, payment of the WAUG PARTNER API is made by deducting the balance of the advance payment. If the balance is less than the amount of the payment, you cannot make an order.
For payment inquiries, please contact the person in charge via email.
You can use the WAUG PARTNER API to view product information in WAUG.
WAUG's product information is expressed in a hierarchical structure and classified into goods, goods options, and product options.
An example of the process of selecting an order is shown below.
1. The user selects a desired product from the product list.
2. The user checks the varying prices depending on the dates to determine the price of the product for the intended date of use.
3-1. If the product price exists for the desired date, the selected product is available to order for the scheduled date of use.
3-2. If the product price does not exist for the desired date, the selected product is not orderable on the scheduled date of use.
4. Select the desired product option and product option item from the orderable product price.
5. Use the WAUG PARTNER API function to view information on the selected product and its options.
There is information that must be entered when making an order for the product. These order input information will vary depending on the product.
It consists of order input information group and order input information field.
Order input information for one product includes multiple groups, and a single group contains multiple fields.
Below is an example of order input information for one product.
    [
        {
            "groupCategory": "ORDER",
            "fields": [
                {
                    "fieldId": 4,
                    "fieldName": "Name on the passport",
                    "fieldExplain": "",
                    "fieldPlaceholder": "",
                    "fieldOption": "",
                    "fieldType": "engname",
                    "required": true
                },
                {
                    "fieldId": 2,
                    "fieldName": "Mobile phone number",
                    "fieldExplain": "",
                    "fieldPlaceholder": "",
                    "fieldOption": "",
                    "fieldType": "mobile",
                    "required": true
                },
                {
                    "fieldId": 8,
                    "fieldName": "email",
                    "fieldExplain": "",
                    "fieldPlaceholder": "",
                    "fieldOption": "",
                    "fieldType": "email",
                    "required": true
                }
            ]
        },
        {
            "groupCategory": "GOODS",
            "fields": [
                {
                    "fieldId": 67,
                    "fieldName": "Hotel name",
                    "fieldExplain": "Please enter the hotel name",
                    "fieldPlaceholder": "",
                    "fieldOption": "",
                    "fieldType": "text",
                    "required": true
                }
            ]
        },
        {
            "groupCategory": "EACH",
            "fields": [
                {
                    "fieldId": 8,
                    "fieldName": "email",
                    "fieldExplain": "",
                    "fieldPlaceholder": "",
                    "fieldOption": "",
                    "fieldType": "email",
                    "required": true
                }
            ]
        }
    ]
                
Category of order input information group
The order input information group is divided into three categories, each consisting of a different group: The categories are described below.
Category Description
ORDER This is the common order input information that corresponds to every order.
GOODS This is the order input information that applies to a particular ordered product.
EACH This is the order input information that applies to a particular ordered product and must be entered according to the quantity ordered.
Field type of order input information
The order input information field is included in one of several types. The field type is described below.
Name of type Description Example
text
textarea
text_short
text_middle
Input text ex) ExampleText
date Enter the date data expressed in the form "yyyy-MM-dd" ex) 1980-01-22
birthdate Enter the birth date expressed in the form “yyyy-mm-dd” ex) 1980-01-22
email Enter the email address ex) guest1@waug.com
engname Enter name on passport ex) HONG GILDONG
time Enter the time data expressed in the form “HH:mm:ss” ex) 09:00
mobile Enter the mobile phone number ex) 8201012341234
tel Enter the telephone number ex) 021231111
number Enter the number ex) 7
radio Field type expressed as radio button on screen
select Field type expressed as select box on screen
checkbox Field type expressed as checkbox on screen
An order can be made by using WAUG PARTNER API
It provides the function to determine if the order creation information that user requests is orderable.
WAUG's order information is hierarchically composed of Order, Order Goods, and Order Options.
Orders contain common order information.
Order Goods contains information about the goods being ordered. Typically there is a product ID.
The Order Option contains the option and option item information for the product to be ordered. Typically, there is a product option ID, an option item ID.
The input information for an order is included in the order or in the ordered product, depending on the group category.
When creating an order, request information must be entered by the same configuration as above and it can be described by the following image below.
An example of the order creation request information is shown below.
ex)
{
  "locale": "ko",
  "orderGoods": [
    {
      "goodsId": 107278,
      "useDate": "2019-04-01",
      "orderOptions": [
        {
          "goodsOptionId": 28919,
          "goodsOptionItemId": 61849,
          "quantity": 1,
          "price": 37080,
          "goodsOptionTimeslotId": 0
        },
        {
          "goodsOptionId": 28919,
          "goodsOptionItemId": 61850,
          "quantity": 2,
          "price": 22000,
          "goodsOptionTimeslotId": 0
        }
      ],
      "orderInfos": [
        {
          "fieldId": 26,
          "groupCategory": "GOODS",
          "values": [
            "ExampleGoodsOrderInfo1"
          ]
        },
        {
          "fieldId": 63,
          "groupCategory": "GOODS",
          "values": [
            "ExampleGoodsOrderInfo1"
          ]
        },
        {
          "fieldId": 4,
          "groupCategory": "EACH",
          "values": [
            "Foo", "Bar", "Example"
          ]
        }
      ]
    },
    {
      "goodsId": 109329,
      "useDate": "2019-04-05",
      "additionalInput": "this is additional input example.",
      "orderOptions": [
        {
          "goodsOptionId": 31451,
          "goodsOptionItemId": 74509,
          "quantity": 1,
          "price": 20580.0,
          "goodsOptionTimeslotId": 0
        }
      ],
      "orderInfos": [
        {
          "fieldId": 6,
          "groupCategory": "GOODS",
          "values": [
            "ExampleGoodsOrderInfo1"
          ]
        }
      ]
    }
  ],
  "orderInfos": [
    {
      "fieldId": 1,
      "groupCategory": "ORDER",
      "values": [
        "ExampleOrderUserKoreanName"
      ]
    },
    {
      "fieldId": 4,
      "groupCategory": "ORDER",
      "values": [
        "ExampleOrderUserEnglishName"
      ]
    },
    {
      "fieldId": 2,
      "groupCategory": "ORDER",
      "values": [
        "ExampleOrderUserContact"
      ]
    },
    {
      "fieldId": 8,
      "groupCategory": "ORDER",
      "values": [
        "example@example.com"
      ]
    }
  ]
}
            
An example of the process of creating an order is shown below.
1. User looks up the information of the product and select the product to order.
2. User looks up the order input information of the product to order.
3. User completes the order creation request information in a proper format.
4. Check whether the order creation request information the user created is orderable.
5. If the order creation request information is available, the request to create an order is made.
6-1. An order is created if it is successfully verified by the WAUG PARTNER API.
6-2. If the validation fails in the WAUG PARTNER API, a non-orderable response is returned.
7. After an order creation in WAUG PARTNER API, instant voucher issuance availability will be checked.
8-1. If the voucher is issued instantly, the voucher will be issued immediately.
8-2. If the voucher cannot be issued instantly, the voucher will be issued after a certain amount of time.
When ordering from the WAUG PARTNER API, you can order multiple products(=goods) in a bundle at once.
Therefore, there is an order status for order and there is an order status for each ordered product(=goods).
The following is a description of the order good's status.
Code Status Description
STATUS_WAIT waiting payment Payment is not completed and an order is created
STATUS_CANCEL order cancelled Payment is not completed. an order is cancelled after being created.
STATUS_PAID order completed Payment is completed and an order is created
STATUS_IN_PROGRESS voucher issuance in progress A voucher issuance is in progress
STATUS_CONFIRMED voucher issued A voucher issuance is completed
STATUS_REFUND_REQUESTED refund requested A refund for the following order is requested
STATUS_REFUND_COMPLETED refund completed The refund request has been processed and the refund has been completed
STATUS_PARTIAL_REFUND_COMPLETED partial refund completed The partial refund request has been processed and the partial refund has been completed
The following is a description of the order's status.
Code Status Description
STATUS_WAIT waiting payment Payment is not completed and an order is created
STATUS_PAID order completed Payment is completed and an order is created
STATUS_REFUND_REQUESTED refund requested A refund for all of ordered products is requested
STATUS_PARTIAL_REFUND_REQUESTED partial refund requested A refund for part of ordered products is requested
STATUS_REFUND_COMPLETED refund completed The refund request for all of ordered products has been processed and the refund has been completed
STATUS_PARTIAL_REFUND_COMPLETED partial refund completed The refund request for part of ordered products has been processed and the partial refund has been completed
You can request a refund of a specific order with the WAUG PARTNER API.
This function will change the status of the order to “refund requested” and the actual refund process will be carried out through a separate procedure.
If any of the items included in the order are non-refundable, the request for a refund will be rejected.
Whether the product is refundable or not can be determined depending on the refundable attribute
An example of the process of requesting a refund for a particular order is shown below.
1. User checks an order to get a refund.
2. User requests a refund by inputting order number.
3. Through WAUG Open API, it will be checked if any of the products included in the refund-requested order are non-refundable.
4-1. If it is refundable product, the refund request succeeds.
4-2. If it is a non-refundable item, the request for a refund fails.
The WAUG PARTNER API provides Webhook function for specific events.
Please contact the person in charge via email to inquire about the Webhook function.
Product Information Change Notification Webhook
Notification Webhook is provided when the product information is modified.
The contents of the Webbook are as follows
{
    "goodsId": 1,
    "type": "GOODS_UPDATE",
    "updatedAt": {
        "date": "yyyy-MM-dd HH:mm:ss.SSS",
        "timezone_type": 3,
        "timezone": "Asia/Seoul"
    }
}
                    
However, product information synchronization is recommended at least once a day since product information modification occur frequently.
Order Status Change Notification Webhook
Notification Webhook is provided when the order status is modified.
The contents of the Webbook are as follows
    {
        "orderNumber": "exampleOrderNumber",
        "orderGoodsId": 1,
        "type": "ORDER_UPDATE",
        "orderStatus": "STATUS_CONFIRMED",
        "updatedAt": {
            "date": "yyyy-MM-dd HH:mm:ss.SSS",
            "timezone_type": 3,
            "timezone": "Asia/Seoul"
        }
    }
                    
However, if it is changed using the refund request function in the WAUG PARTNER API, the Webbook will not be sent. Check for example of order status on explanation of orderStatus.
- 2019-04-02 : Publication of WAUG PARTNER API Document v1.0.0
- 2019-11-25 : Fix bug that order good's status is not "STATUS_REFUND_REQUESTED" when status of order is request refund.
- 2019-11-25 : Fix when /v1/orders , v1/orders/{orderNumber}, v1/orders-partner/{partnerOrderNumber}, /v1/orders/{orderNumber}/refund-request call, return order's status which has 5 enum values
- 2019-12-16 : Add api request throttling (100 times / 10 seconds)
- 2020-01-09 : Add refund-request api v2 (refund-request api v1 will be deprecated '2020-03-17')
- 2020-02-17 : fix refund-request api v2(fix reqeust parameters)
- 2020-04-02 : change /v1/goods/{goodsId}/comments api max page size(10000->100)
- 2020-04-06 : Close refund-request api v2 temporarily(it will reopen after updating system developments)
- 2020-06-10 : Reopen refund-request api v2 (only for slack alaram)
- 2020-10-12 : /v1/orders call, add startDate and endDate as request parameter
- 2021-04-09 : /v1/goods/{goodsId} call, add availableTime to the Response field
- 2021-12-22 : /v1/goods/{goodsId} call, add notification to the Response field