{"openapi":"3.0.0","info":{"description":"Welcome to The A2P documentation. \n<br> The objective of this document is to define the messaging between Client and 3Ads Platform with the scope :\n<br><ul><li>Connection between Client and 3Ads platform using HTTP request and JSON response.</li><li>All client will be whitelist ip.</li><li>Loggical Description Diagram and flow diagram as API Developer guide.</li></ul>\n","version":"1.0.0","title":"A2P Ads API","termsOfService":"https://www.a2p.id/terms","contact":{"name":"Contact","email":"support@3ads.id"},"license":{"name":"Copyright A2P Ads API 2022. All rights reserved"}},"servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/Martinus21/A2P/1.0.0"},{"url":"https://demoapi.rctech.id/api/3rdparty","description":"Development server"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Generate Access Token","description":"This web service is used to create access token. this web services is used to create access token. Upon partnership, a set of client key and client secret will be given to partner for accessing the web services.To access a service, partner must first generate access token. The access token can be used in one time and must be regenerate after expiration to get new access token.\n  <table>\n    <tr>\n      <th>Method</th>\n      <th>URL/IP</th>\n    </tr>\n    <tr>\n      <td>GET</td>\n      <td>https://3AdsURL/accesstoken</td>\n    </tr>\n  </table>\n  <h3>Request Parameter</h3>\n  <table>\n    <tr>\n      <th>Type</th>\n      <th>Parameter</th>\n      <th>Values</th>\n      <th>Description</th>\n    </tr>\n    <tr>\n      <td>Header</td>\n      <td>Authorization</td>\n      <td>String</td>\n      <td>Fill with Base 64 encoding of username:password</td>\n    </tr>\n  </table>\n"},{"name":"Send SMS","description":"This command is used to send SMS to MSISDN. Upon success call of this method, 3Ads will return request accepted response. After transaction is conducted in 3ads backend, 3ads will send a callback to Partner informing the SMS status.\n  <table>\n    <tr>\n      <th>Method</th>\n      <th>URL/IP</th>\n    </tr>\n    <tr>\n      <td>POST</td>\n      <td>https://3AdsURL/sendSMS</td>\n    </tr>\n  </table>\n  <h3>Request Parameter</h3>\n  <table>\n    <tr>\n      <th>Type</th>\n      <th>Parameter</th>\n      <th>Values</th>\n      <th>Description</th>\n    </tr>\n    <tr>\n      <td>Header</td>\n      <td>Authorization</td>\n      <td>String</td>\n      <td>Fill with “Bearer ”. See section 2.2</td>\n    </tr>\n  </table>\n  <h3>Request Body</h3>\n  <table>\n    <tr>\n      <th>Type</th>\n      <th>Parameter</th>\n      <th>Values</th>\n      <th>Description</th>\n    </tr>\n    <tr>\n      <td>Json Entity</td>\n      <td>msisdn</td>\n      <td>Numeric</td>\n      <td>3ads . Accepted 3 number Prefix ex : [62895,62896,62897,62898,62899]</td>\n    </tr>\n    <tr>\n      <td>Json Entity</td>\n      <td>messagewording</td>\n      <td>String</td>\n      <td>Wording in body message with max 160 char inclueding space</td>\n    </tr>\n    <tr>\n      <td>Json Entity</td>\n      <td>masking</td>\n      <td>String</td>\n      <td>Label masking with max 14 charincluding space</td>\n    </tr>\n    <tr>\n      <td>Json Entity</td>\n      <td>transid</td>\n      <td>String</td>\n      <td>Partner Transaction ID, should be unique with format (PARTNER_ID, timestamp,3 digit random)</td>\n    </tr>\n  </table>\n"},{"name":"Delivery Status Report","description":"After SMS transaction is conducted, 3ads will send delivery report callback to partner callback URL.\n  <table>\n    <tr>\n      <th>Method</th>\n      <th>URL/IP</th>\n    </tr>\n    <tr>\n      <td>GET</td>\n      <td>https://partnerUrl</td>\n    </tr>\n  </table>\n  \n"}],"paths":{"/accesstoken":{"get":{"tags":["Generate Access Token"],"operationId":"Access Token","parameters":[{"in":"header","description":"an authorization header","name":"auth","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/generateAccessToken200"}}}},"401":{"description":"Invalid API key -- Please verify your API Key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/401"}}}}}}},"/sendSMS":{"post":{"tags":["Send SMS"],"operationId":"Send SMS","parameters":[{"in":"header","description":"an authorization header","name":"auth","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sendSMS"}}},"required":true},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sendSMS200"}}}},"400":{"description":"Invalid MSISDN.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sendSMS400"}}}},"401":{"description":"Invalid API key -- Please verify your API Key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/401"}}}}}}},"/partnerUrl/msisdn={Msisdn}&transid={Transid}&status={Status}":{"get":{"tags":["Delivery Status Report"],"description":"After SMS transaction is conducted, 3ads will send delivery report callback to partner callback URL.","operationId":"get Delivery Status Report","parameters":[{"name":"Msisdn","in":"path","required":true,"schema":{"type":"number"}},{"name":"Transid","in":"path","required":true,"schema":{"type":"string"}},{"name":"Status","in":"path","required":true,"schema":{"type":"number"}}],"responses":{"200":{"description":"successful"},"400":{"description":"Failed"}},"security":[{"bearerAuth":[]}]}}},"components":{"schemas":{"generateAccessToken200":{"description":"Schema for 200","type":"object","properties":{"status":{"type":"boolean","example":0},"access_token":{"type":"string","example":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9sb2NhbGhvc3RcL3dob3AtY29yZVwvcHVibGljXC9hcGlcLzNyZHBhcnR5XC9nZW5lcmF0ZVRva2VuIiwiaWF0IjoxNjU4MjI5OTk5LCJleHAiOjE2NTgzMTYzOTksIm5iZiI6MTY1ODIyOTk5OSwianRpIjoiZFpSemd1QlAzdk16RTd5dyIsInN1YiI6NDAzMTYwMDEsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjciLCJjb21wYW55X2lkIjo0MDMxfQ.uZZZ0EBnP4SUOHs3qwYXU8C5d_vzlT2SFMG9nyAVayA"}}},"sendSMS200":{"description":"Schema for 200","type":"object","properties":{"msisdn":{"type":"number","example":62898436816},"transid":{"type":"string","example":"PTR1234567890"},"status":{"type":"boolean","example":0},"desc":{"type":"string","example":"accepted"}}},"sendSMS400":{"description":"Schema for 400","type":"object","properties":{"status":{"type":"string","example":"-1"},"message":{"type":"string","example":"Invalid MSISDN"}}},"401":{"description":"Schema for 401","type":"object","properties":{"status":{"type":"number","example":401},"message":{"type":"string","example":"Unauthorized"}}},"sendSMS":{"type":"object","properties":{"msisdn":{"type":"integer","format":"int64"},"messagewording":{"type":"integer","format":"int64"},"masking":{"type":"integer","format":"int32"},"transid":{"type":"string","format":"date-time"}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A2P uses Auth (Authentication) Token key to authorize your device to ingest data inside.<br><br>Authentication token keys are generated when you hit API. You can find your Auth access Token"}}}}