openapi: 3.0.3 info: title: 'Shortlink Service Docs' description: 'Shortlink service allows you to create redirections based on conditions.' version: 1.0.0 servers: - url: 'http://links.lim.bz' paths: /api/app: get: summary: 'Get application info.' description: 'Get current authenticated application info.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '200' content: application/json: schema: type: object example: client: 'Example Application' access_token: eyXXXXXXXX.XXXXXXX.XXXX expires_at: '2031-02-07T12:47:58.000000Z' scopes: ['*'] properties: client: { type: string, example: 'Example Application' } access_token: { type: string, example: eyXXXXXXXX.XXXXXXX.XXXX } expires_at: { type: string, example: '2031-02-07T12:47:58.000000Z' } scopes: { type: array, example: ['*'], items: { type: string } } tags: - Application /api/app/settings: put: summary: 'Update application settings.' description: "You can update your webhook listener url or email. Signals to your system will be sent via one of three ways: POST, GET or EMAIL.\nEvery event like shortlink has been entered or end user has been redirected may send signal to your system or application." parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: { } tags: - Application requestBody: required: false content: application/json: schema: type: object properties: listener_uri: type: string description: 'The value must be a valid URL. This endpoint should be able to receive HTTP POST Request.' example: 'https://yourdomain.com/listener.php' email: type: string description: 'The value must be a valid email address. All registered EMAIL Signals will be send on this email.' example: signals@yourdomain.com '/api/shortlinks/{shortlink}/signals/{signal}/conditions': post: summary: 'Add condition to Signal.' description: 'You can create new condition for Signal. Remember signal will be send if end user satisfies all conditions.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: { id: 1, first_time: '2021-08-03T00:00:00.000000Z', second_time: null, operator: 'LESS THAN', created_at: '2021-03-16T11:22:16.000000Z', updated_at: '2021-03-16T11:22:16.000000Z' } properties: data: { type: object, example: { id: 1, first_time: '2021-08-03T00:00:00.000000Z', second_time: null, operator: 'LESS THAN', created_at: '2021-03-16T11:22:16.000000Z', updated_at: '2021-03-16T11:22:16.000000Z' } } tags: - Conditions parameters: - in: path name: shortlink description: 'Shortlink Id.' example: 7 required: true schema: type: integer - in: path name: signal description: 'Signal Id.' example: 7 required: true schema: type: integer '/api/shortlinks/{shortlink}/interstitials/{interstitial}/conditions': post: summary: 'Add condition to Interstitial.' description: 'You can create new condition for Interstitial. Remember end user needs to satisfy all conditions to show interstitial.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: { id: 1, first_time: '2021-08-03T00:00:00.000000Z', second_time: null, operator: 'LESS THAN', created_at: '2021-03-16T11:22:16.000000Z', updated_at: '2021-03-16T11:22:16.000000Z' } properties: data: { type: object, example: { id: 1, first_time: '2021-08-03T00:00:00.000000Z', second_time: null, operator: 'LESS THAN', created_at: '2021-03-16T11:22:16.000000Z', updated_at: '2021-03-16T11:22:16.000000Z' } } tags: - Conditions parameters: - in: path name: shortlink description: 'Shortlink Id.' example: 20 required: true schema: type: integer - in: path name: interstitial description: 'Interstitial Id.' example: 3 required: true schema: type: integer '/api/shortlinks/{shortlink}/destinations/{destination}/conditions': post: summary: 'Add condition to Destination.' description: 'You can create new condition for Destination. Remember that end user will be redirected to destination if end user satisfies all conditions.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: { id: 1, first_time: '2021-08-03T00:00:00.000000Z', second_time: null, operator: 'LESS THAN', created_at: '2021-03-16T11:22:16.000000Z', updated_at: '2021-03-16T11:22:16.000000Z' } properties: data: { type: object, example: { id: 1, first_time: '2021-08-03T00:00:00.000000Z', second_time: null, operator: 'LESS THAN', created_at: '2021-03-16T11:22:16.000000Z', updated_at: '2021-03-16T11:22:16.000000Z' } } tags: - Conditions parameters: - in: path name: shortlink description: 'Shortlink Id.' example: 20 required: true schema: type: integer - in: path name: destination description: 'Destination Id.' example: 19 required: true schema: type: integer '/api/shortlinks/{shortlink}/signals/{signal}/conditions/{condition}': delete: summary: 'Remove condition from Signal.' description: 'You can remove existing condition from Signal. Remember end user needs to satisfy all conditions to send signal.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '200' content: text/plain: schema: type: string example: '{[]}' tags: - Conditions parameters: - in: path name: shortlink description: 'Shortlink Id.' example: 2 required: true schema: type: integer - in: path name: signal description: 'Signal Id.' example: 5 required: true schema: type: integer - in: path name: condition description: 'Condition Id which will be deleted.' example: 5 required: true schema: type: integer '/api/shortlinks/{shortlink}/interstitials/{interstitial}/conditions/{condition}': delete: summary: 'Remove condition from Interstitial.' description: 'You can remove existing condition from Interstitial. Remember end user needs to satisfy all conditions to show interstitial.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '200' content: text/plain: schema: type: string example: '{[]}' tags: - Conditions parameters: - in: path name: shortlink description: 'Shortlink Id.' example: 18 required: true schema: type: integer - in: path name: interstitial description: 'Interstitial Id.' example: 12 required: true schema: type: integer - in: path name: condition description: 'Condition Id which will be deleted.' example: 20 required: true schema: type: integer '/api/shortlinks/{shortlink}/destinations/{destination}/conditions/{condition}': delete: summary: 'Remove condition from Destination.' description: 'You can remove existing condition from Signal. Remember end user needs to satisfy all conditions to be redirected to destination.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '200' content: text/plain: schema: type: string example: '{[]}' tags: - Conditions parameters: - in: path name: shortlink description: 'Shortlink Id.' example: 8 required: true schema: type: integer - in: path name: destination description: 'Destination Id.' example: 20 required: true schema: type: integer - in: path name: condition description: 'Condition Id which will be deleted.' example: 8 required: true schema: type: integer '/api/shortlinks/{shortlink}/destinations': get: summary: 'Get shortlink all destinations.' description: 'Get list of all destinations for certain shortlink' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: [{ id: 1, uri: 'https://ct.winlocal.io/bedford', is_default: 1, conditions: [] }, { id: 1, uri: 'https://ct.winlocal.io/bedford', is_default: 1, conditions: [] }] properties: data: { type: array, example: [{ id: 1, uri: 'https://ct.winlocal.io/bedford', is_default: 1, conditions: [] }, { id: 1, uri: 'https://ct.winlocal.io/bedford', is_default: 1, conditions: [] }], items: { type: object } } tags: - Destinations post: summary: 'Create Destination for shortlink.' description: 'You can create new Destination for existing shortlink.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: { id: 1, uri: 'https://ct.winlocal.io/bedford', is_default: 1, conditions: [] } properties: data: { type: object, example: { id: 1, uri: 'https://ct.winlocal.io/bedford', is_default: 1, conditions: [] } } tags: - Destinations requestBody: required: false content: application/json: schema: type: object properties: __asterisk__: type: object description: '' example: [] properties: { uri: { type: string, description: 'The value must be a valid URL.', example: 'http://stroman.com/hic-consequuntur-vel-sed-et-adipisci-mollitia.html' }, conditions: { type: object, description: '', example: [], properties: [{ type: object, description: '', example: [], properties: { type: { type: string, description: 'The value must be one of DATE, TIME, CONTINENT, COUNTRY, REGION, CITY, RETURNING, LATLONG, TEMPERATURE, or WEATHER.', example: TIME } } }] }, is_default: { type: string, description: 'The value must be one of 1, 1, or true.', example: '1' } } is_default: type: boolean description: '(Required if conditions are not set).' example: true conditions: type: array description: '(Required if is_default is not set).' example: [[], []] items: { type: object, properties: { first_date: { type: string, description: '(Required if type is DATE). Date format: Y-m-d H:i:s', example: porro }, second_date: { type: string, description: '(Required if type is DATE and operator is BETWEEN). Date format: Y-m-d H:i:s', example: rem }, first_time: { type: string, description: '(Required if type is TIME). Time format: h:i:s A', example: dignissimos }, second_time: { type: string, description: '(Required if type is TIME and operator is BETWEEN). Time format: h:i:s A', example: quo }, continent_code: { type: string, description: '(Required if type is CONTINENT and continent is not present). 2 characters long.', example: et }, continent: { type: string, description: '(Required if type is CONTINENT and continent_code is not present).', example: enim }, country_code: { type: string, description: '(Required if type is COUNTRY and country is not present). 2 characters long.', example: pariatur }, country: { type: string, description: '(Required if type is COUNTRY and country_code is not present).', example: dolores }, region_code: { type: string, description: '(Required if type is REGION and region is not present). 2 characters long.', example: voluptas }, region: { type: string, description: '(Required if type is REGION and region_code is not present).', example: est }, latitude: { type: numeric, description: '(Required if type is LATLONG). Between: -90.0000000,90.0000000', example: et }, longitude: { type: numeric, description: '(Required if type is LATLONG). Between: -180.0000000,180.0000000', example: reiciendis }, range: { type: integer, description: '(Required if type is LATLONG). Between: 10, 10000. Value in miles.', example: 18 }, temperature: { type: integer, description: '(Required if type is TEMPERATURE). Between: -60, 60. Value in Celsius.', example: 16 }, weather: { type: string, description: '(Required if type is WEATHER). In: SUNNY, CLEAN, RAINY, FOGGY, SNOWY, CLOUDY, STORMY, HAIL', example: numquam } } } parameters: - in: path name: shortlink description: 'Shortlink Id.' example: 7 required: true schema: type: integer '/api/shortlinks/{shortlink}/destinations/{destination}': put: summary: 'Update Destination for shortlink.' description: 'You can update existing destination.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: { id: 1, uri: 'https://ct.winlocal.io/bedford', is_default: 1, conditions: [] } properties: data: { type: object, example: { id: 1, uri: 'https://ct.winlocal.io/bedford', is_default: 1, conditions: [] } } tags: - Destinations requestBody: required: true content: application/json: schema: type: object properties: uri: type: string description: 'The value must be a valid URL.' example: 'http://www.satterfield.com/sunt-doloremque-soluta-earum-nostrum-aut-saepe' is_default: type: boolean description: 'The value must be one of 1 or true.' example: true required: - uri delete: summary: 'Delete Destination for shortlink.' description: 'You can delete existing Destination. This action can not be undone!' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: { } tags: - Destinations parameters: - in: path name: shortlink description: 'Shortlink Id.' example: 10 required: true schema: type: integer - in: path name: destination description: 'Destination which will be updated.' example: 10 required: true schema: type: integer /api/domains: post: summary: 'Create domain.' description: "Create domain. You need to be owner of provided domain.\nPlease redirect domain records for" parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: { id: 1, domain: linkto.us, created_at: '2020-11-23T15:58:34.000000Z' } properties: data: { type: object, example: { id: 1, domain: linkto.us, created_at: '2020-11-23T15:58:34.000000Z' } } tags: - Domains requestBody: required: true content: application/json: schema: type: object properties: domain: type: string description: '' example: cupiditate is_default: type: boolean description: '' example: false required: - domain get: summary: 'Get all domains' description: 'Returns all domains assigned to application.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: [{ id: 1, domain: linkto.us, created_at: '2020-11-23T15:58:34.000000Z' }, { id: 1, domain: linkto.us, created_at: '2020-11-23T15:58:34.000000Z' }] properties: data: { type: array, example: [{ id: 1, domain: linkto.us, created_at: '2020-11-23T15:58:34.000000Z' }, { id: 1, domain: linkto.us, created_at: '2020-11-23T15:58:34.000000Z' }], items: { type: object } } tags: - Domains '/api/domains/{domain}': get: summary: 'Get single domain' description: 'Returns single domain info.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: { id: 1, domain: linkto.us, created_at: '2020-11-23T15:58:34.000000Z' } properties: data: { type: object, example: { id: 1, domain: linkto.us, created_at: '2020-11-23T15:58:34.000000Z' } } tags: - Domains parameters: - in: path name: domain description: 'Optional parameter. Domain id assigned to your application.' required: true schema: type: string examples: omitted: summary: 'When the value is omitted' value: '' present: summary: 'When the value is present' value: '1' '/api/domains/{domain}/subdomains': post: summary: 'Create subdomain for domain.' description: "Creates subdomain for your domain.\n\"Empty\" subdomain for each domain is created automatically which is default." parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: { } tags: - Domains requestBody: required: true content: application/json: schema: type: object properties: subdomain: type: string description: '' example: officiis $subdomain: type: string description: 'You can use subdomain of your domain. If you want to use links.yourdomain.com as base redirect link, you should create domain: yourdomain.com and default subdomain links.' example: links $is_default: type: boolean description: 'optional This option sets this subdomain as a default.' example: false required: - subdomain - $subdomain parameters: - in: path name: domain description: 'Optional parameter. Existing domain ID assigned to your application. Created Subdomain will be assigned to this domain.' required: true schema: type: string examples: omitted: summary: 'When the value is omitted' value: '' present: summary: 'When the value is present' value: '1' '/api/shortlinks/{shortlink}/pixeltracks': get: summary: 'Get shortlink all Pixel Track actions.' description: 'Get list of all Pixel Track actions for certain shortlink' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: [{ id: 1, action: ViewContent, attributes: [{ key: page_type, value: mbc }, { key: business_id, value: 66 }, { key: company_name, value: 'Kruszewski Group' }, { key: mbc_id, value: 131 }, { key: user_id, value: 178 }, { key: mbc_theme_id, value: 22 }] }, { id: 1, action: ViewContent, attributes: [{ key: page_type, value: mbc }, { key: business_id, value: 66 }, { key: company_name, value: 'Kruszewski Group' }, { key: mbc_id, value: 131 }, { key: user_id, value: 178 }, { key: mbc_theme_id, value: 22 }] }] properties: data: { type: array, example: [{ id: 1, action: ViewContent, attributes: [{ key: page_type, value: mbc }, { key: business_id, value: 66 }, { key: company_name, value: 'Kruszewski Group' }, { key: mbc_id, value: 131 }, { key: user_id, value: 178 }, { key: mbc_theme_id, value: 22 }] }, { id: 1, action: ViewContent, attributes: [{ key: page_type, value: mbc }, { key: business_id, value: 66 }, { key: company_name, value: 'Kruszewski Group' }, { key: mbc_id, value: 131 }, { key: user_id, value: 178 }, { key: mbc_theme_id, value: 22 }] }], items: { type: object } } tags: - 'Facebook Pixel Tracks' post: summary: 'Create Facebook Pixel track action for existing shortlink' description: 'You can create new Facebook Pixel action for existing shortlink.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: { id: 1, action: ViewContent, attributes: [{ key: page_type, value: mbc }, { key: business_id, value: 66 }, { key: company_name, value: 'Kruszewski Group' }, { key: mbc_id, value: 131 }, { key: user_id, value: 178 }, { key: mbc_theme_id, value: 22 }] } properties: data: { type: object, example: { id: 1, action: ViewContent, attributes: [{ key: page_type, value: mbc }, { key: business_id, value: 66 }, { key: company_name, value: 'Kruszewski Group' }, { key: mbc_id, value: 131 }, { key: user_id, value: 178 }, { key: mbc_theme_id, value: 22 }] } } tags: - 'Facebook Pixel Tracks' requestBody: required: true content: application/json: schema: type: object properties: action: type: string description: 'Each Facebook Pixel action need to have action field.' example: viewContent attributes: type: array description: '' example: [[]] items: { type: object, properties: { key: { type: string, description: 'Name of key.', example: quae }, value: { type: string|int, description: 'Value for the key.', example: et } }, required: [key, value] } required: - action parameters: - in: path name: shortlink description: 'Optional parameter. Shortlink Id.' required: true schema: type: integer examples: omitted: summary: 'When the value is omitted' value: '' present: summary: 'When the value is present' value: 1 '/api/shortlinks/{shortlink}/pixeltracks/{pixeltrack}': delete: summary: 'Delete Pixel Track action for shortlink.' description: 'You can delete existing Pixel Track action. This action can not be undone!' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '200' content: text/plain: schema: type: string example: '{[]}' tags: - 'Facebook Pixel Tracks' parameters: - in: path name: shortlink description: 'Shortlink Id.' example: 18 required: true schema: type: integer - in: path name: pixeltrack description: 'PixelTrack Id which will be deleted.' example: 12 required: true schema: type: integer '/api/shortlinks/{shortlink}/heads': get: summary: 'Get shortlink all tags.' description: 'Get list of all heads tags for certain shortlink' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: [{ id: 1, head: '', created_at: '2021-08-03T08:14:23.000000Z' }, { id: 1, head: '', created_at: '2021-08-03T08:14:23.000000Z' }] properties: data: { type: array, example: [{ id: 1, head: '', created_at: '2021-08-03T08:14:23.000000Z' }, { id: 1, head: '', created_at: '2021-08-03T08:14:23.000000Z' }], items: { type: object } } tags: - Heads post: summary: 'Create Head section.' description: 'You can create any tag which will be placed between ....' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: { id: 1, head: '', created_at: '2021-08-03T08:14:23.000000Z' } properties: data: { type: object, example: { id: 1, head: '', created_at: '2021-08-03T08:14:23.000000Z' } } tags: - Heads requestBody: required: true content: application/json: schema: type: object properties: head: type: string description: 'Full tag.' example: '' required: - head parameters: - in: path name: shortlink description: 'Optional parameter. Shortlink Id.' required: true schema: type: integer examples: omitted: summary: 'When the value is omitted' value: '' present: summary: 'When the value is present' value: 1 '/api/shortlinks/{shortlink}/heads/{head}': put: summary: 'Update Head for shortlink.' description: 'You can update existing Head.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: { id: 1, head: '', created_at: '2021-08-03T08:14:23.000000Z' } properties: data: { type: object, example: { id: 1, head: '', created_at: '2021-08-03T08:14:23.000000Z' } } tags: - Heads requestBody: required: true content: application/json: schema: type: object properties: head: type: string description: '' example: dolorem required: - head delete: summary: 'Delete head for shortlink.' description: 'You can delete existing head. This action can not be undone!' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '200' content: text/plain: schema: type: string example: '{[]}' tags: - Heads parameters: - in: path name: shortlink description: 'Shortlink Id.' example: 15 required: true schema: type: integer - in: path name: head description: 'Head which will be updated.' example: 1 required: true schema: type: integer '/api/shortlinks/{shortlink}/interstitials': get: summary: 'Get shortlink all interstitials.' description: 'Get list of all interstitials for certain shortlink' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: [{ id: 2, type: IFRAME, url: 'https://ct.winlocal.io/knadtest/iframecontent/index.html', html: null, title: null, body: null, is_default: 1, conditions: [] }, { id: 2, type: IFRAME, url: 'https://ct.winlocal.io/knadtest/iframecontent/index.html', html: null, title: null, body: null, is_default: 1, conditions: [] }] properties: data: { type: array, example: [{ id: 2, type: IFRAME, url: 'https://ct.winlocal.io/knadtest/iframecontent/index.html', html: null, title: null, body: null, is_default: 1, conditions: [] }, { id: 2, type: IFRAME, url: 'https://ct.winlocal.io/knadtest/iframecontent/index.html', html: null, title: null, body: null, is_default: 1, conditions: [] }], items: { type: object } } tags: - Interstitials post: summary: 'Create Interstitial for shortlink.' description: 'You can create new Interstitial for existing shortlink.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: { id: 2, type: IFRAME, url: 'https://ct.winlocal.io/knadtest/iframecontent/index.html', html: null, title: null, body: null, is_default: 1, conditions: [] } properties: data: { type: object, example: { id: 2, type: IFRAME, url: 'https://ct.winlocal.io/knadtest/iframecontent/index.html', html: null, title: null, body: null, is_default: 1, conditions: [] } } tags: - Interstitials requestBody: required: true content: application/json: schema: type: object properties: type: type: string description: 'The value must be one of IFRAME, POPUP, or HTML.' example: IFRAME url: type: string description: '(Required if type is IFRAME) Content of interstitial shown in IFRAME.' example: et html: type: string description: '(Required if type is HTML) Content of interstitial as a html tags' example: rerum title: type: string description: '(Required if type is POPUP) Title of popup interstitial.' example: quia body: type: string description: '(Required if type is POPUP) Body of popup.' example: fugit is_default: type: boolean description: '(Required if conditions are not set).' example: false conditions: type: array description: '(Required if is_default is not set).' example: [[], []] items: { type: object, properties: { type: { type: string, description: 'The value must be one of DATE, TIME, CONTINENT, COUNTRY, REGION, CITY, RETURNING, LATLONG, TEMPERATURE, or WEATHER.', example: CONTINENT }, operator: { type: string, description: 'The value must be one of BETWEEN, EQUAL, LESS THAN, GREATER THAN, or IN RANGE.', example: BETWEEN }, first_date: { type: string, description: '(Required if type is DATE). Date format: Y-m-d H:i:s', example: sunt }, second_date: { type: string, description: '(Required if type is DATE and operator is BETWEEN). Date format: Y-m-d H:i:s', example: nihil }, first_time: { type: string, description: '(Required if type is TIME). Time format: h:i:s A', example: ut }, second_time: { type: string, description: '(Required if type is TIME and operator is BETWEEN). Time format: h:i:s A', example: in }, continent_code: { type: string, description: '(Required if type is CONTINENT and continent is not present). 2 characters long.', example: beatae }, continent: { type: string, description: '(Required if type is CONTINENT and continent_code is not present).', example: est }, country_code: { type: string, description: '(Required if type is COUNTRY and country is not present). 2 characters long.', example: et }, country: { type: string, description: '(Required if type is COUNTRY and country_code is not present).', example: nihil }, region_code: { type: string, description: '(Required if type is REGION and region is not present). 2 characters long.', example: qui }, region: { type: string, description: '(Required if type is REGION and region_code is not present).', example: voluptatem }, latitude: { type: numeric, description: '(Required if type is LATLONG). Between: -90.0000000,90.0000000', example: voluptatum }, longitude: { type: numeric, description: '(Required if type is LATLONG). Between: -180.0000000,180.0000000', example: culpa }, range: { type: integer, description: '(Required if type is LATLONG). Between: 10, 10000. Value in miles.', example: 7 }, temperature: { type: integer, description: '(Required if type is TEMPERATURE). Between: -60, 60. Value in Celsius.', example: 19 }, weather: { type: string, description: '(Required if type is WEATHER). In: SUNNY, CLEAN, RAINY, FOGGY, SNOWY, CLOUDY, STORMY, HAIL', example: autem } }, required: [type, operator] } required: - type parameters: - in: path name: shortlink description: 'Shortlink Id.' example: 12 required: true schema: type: integer '/api/shortlinks/{shortlink}/interstitials/{interstitial}': put: summary: 'Update Interstitial for shortlink.' description: 'You can update existing interstitial.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: { id: 2, type: IFRAME, url: 'https://ct.winlocal.io/knadtest/iframecontent/index.html', html: null, title: null, body: null, is_default: 1, conditions: [] } properties: data: { type: object, example: { id: 2, type: IFRAME, url: 'https://ct.winlocal.io/knadtest/iframecontent/index.html', html: null, title: null, body: null, is_default: 1, conditions: [] } } tags: - Interstitials requestBody: required: true content: application/json: schema: type: object properties: type: type: string description: 'The value must be one of IFRAME, POPUP, or HTML.' example: IFRAME url: type: string description: 'The value must be a valid URL.' example: 'http://www.hilpert.com/impedit-voluptatum-quasi-hic-nihil' html: type: string description: '' example: { } title: type: string description: '' example: { } body: type: string description: '' example: { } required: - type delete: summary: 'Delete Interstitial for shortlink.' description: 'You can delete existing Interstitial. This action can not be undone!' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '200' content: text/plain: schema: type: string example: '{[]}' tags: - Interstitials parameters: - in: path name: shortlink description: 'Shortlink Id.' example: 3 required: true schema: type: integer - in: path name: interstitial description: 'Interstitial which will be updated.' example: 3 required: true schema: type: integer '/api/shortlinks/{shortlink}/linkedinpixels': get: summary: 'Get shortlink all Linkedin Pixel Partner Ids' description: 'Get list of all Linkedin Pixel Partner Ids for certain shortlink' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: [{ id: null, linkedin_partner_id: null }, { id: null, linkedin_partner_id: null }] properties: data: { type: array, example: [{ id: null, linkedin_partner_id: null }, { id: null, linkedin_partner_id: null }], items: { type: object } } tags: - 'Linkedin Pixel' post: summary: 'Create Linkedin Pixel for existing shortlink' description: 'You can create new Linkedin Pixel for existing shortlink.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: { id: null, linkedin_partner_id: null } properties: data: { type: object, example: { id: null, linkedin_partner_id: null } } tags: - 'Linkedin Pixel' requestBody: required: true content: application/json: schema: type: object properties: linkedin_partner_id: type: string description: 'Linkedin Partner Id' example: viewContent required: - linkedin_partner_id parameters: - in: path name: shortlink description: 'Optional parameter. Shortlink Id.' required: true schema: type: integer examples: omitted: summary: 'When the value is omitted' value: '' present: summary: 'When the value is present' value: 1 '/api/shortlinks/{shortlink}/linkedinpixels/{linkedinpixel}': delete: summary: 'Delete Linkedin Pixel from shortlink.' description: 'You can delete existing Linkedin Pixel. This action can not be undone!' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '200' content: text/plain: schema: type: string example: '{[]}' tags: - 'Linkedin Pixel' parameters: - in: path name: shortlink description: 'Shortlink Id.' example: 6 required: true schema: type: integer - in: path name: linkedinpixel description: 'Linkedin Pixel Id which will be deleted.' example: 18 required: true schema: type: integer '/api/shortlinks/{shortlink}/ogtags': get: summary: 'Get shortlink all tags.' description: 'Get list of all og tags for certain shortlink' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: [{ id: 1, property: 'og:title', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 1, property: 'og:title', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }] properties: data: { type: array, example: [{ id: 1, property: 'og:title', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 1, property: 'og:title', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }], items: { type: object } } tags: - OgTags post: summary: 'Create OgTag for shortlink.' description: 'You can create new OgTag for existing shortlink.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: { id: 1, property: 'og:title', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' } properties: data: { type: object, example: { id: 1, property: 'og:title', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' } } tags: - OgTags requestBody: required: true content: application/json: schema: type: object properties: property: type: string description: 'Each OgTag need to have property field.' example: 'og:title' content: type: string description: 'Value for OgTag.' example: 'Title for my shortlink' required: - property - content parameters: - in: path name: shortlink description: 'Optional parameter. Shortlink Id.' required: true schema: type: integer examples: omitted: summary: 'When the value is omitted' value: '' present: summary: 'When the value is present' value: 1 '/api/shortlinks/{shortlink}/ogtags/{ogtag}': put: summary: 'Update OgTag for shortlink.' description: 'You can update existing OgTag.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: { id: 1, property: 'og:title', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' } properties: data: { type: object, example: { id: 1, property: 'og:title', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' } } tags: - OgTags requestBody: required: true content: application/json: schema: type: object properties: property: type: string description: '' example: amet content: type: string description: '' example: incidunt required: - property - content delete: summary: 'Delete OgTag for shortlink.' description: 'You can delete existing OgTag. This action can not be undone!' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '200' content: text/plain: schema: type: string example: '{[]}' tags: - OgTags parameters: - in: path name: shortlink description: 'Shortlink Id.' example: 2 required: true schema: type: integer - in: path name: ogtag description: 'OgTag which will be updated.' example: 2 required: true schema: type: integer '/api/shortlinks/{shortlink}/scripts': get: summary: 'Get shortlink all scripts.' description: 'Get list of all scripts for certain shortlink' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: [{ id: null, script: null, noscript: null }, { id: null, script: null, noscript: null }] properties: data: { type: array, example: [{ id: null, script: null, noscript: null }, { id: null, script: null, noscript: null }], items: { type: object } } tags: - Scripts post: summary: 'Create Script for shortlink.' description: 'You can create new Scripts for existing shortlink.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: { id: null, script: null, noscript: null } properties: data: { type: object, example: { id: null, script: null, noscript: null } } tags: - Scripts requestBody: required: true content: application/json: schema: type: object properties: script: type: string description: 'Script which will be run if end-user has javascript enabled.' example: tenetur noscript: type: string description: 'The <noscript> tag defines an alternate content to be displayed to users that have disabled scripts in their browser or have a browser that doesn''t support script.' example: et required: - script parameters: - in: path name: shortlink description: 'Optional parameter. Shortlink Id.' required: true schema: type: integer examples: omitted: summary: 'When the value is omitted' value: '' present: summary: 'When the value is present' value: 18 '/api/shortlinks/{shortlink}/scripts/{script}': put: summary: 'Update Script for shortlink.' description: 'You can update existing Script.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: { } tags: - Scripts requestBody: required: true content: application/json: schema: type: object properties: script: type: string description: '' example: qui noscript: type: string description: '' example: { } required: - script delete: summary: 'Delete Script for shortlink.' description: 'You can delete existing Script. This action can not be undone!' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: { } tags: - Scripts parameters: - in: path name: shortlink description: 'Shortlink Id.' example: 13 required: true schema: type: integer - in: path name: script description: '' example: quas required: true schema: type: string - in: path name: ogtag description: 'OgTag which will be updated.' example: 13 required: true schema: type: integer /api/shortlinks: get: summary: 'Get all shortlinks' description: 'Returns all shortlinks assigned to application.' parameters: - in: query name: 'filter[alias]' description: 'Filter results by alias. Available filters: alias subdomain domain external_id subdomain_id' example: omnis required: false schema: type: string description: 'Filter results by alias. Available filters: alias subdomain domain external_id subdomain_id' example: omnis - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: [{ id: 1, shortlink: linkto.us/bedford, domain: linkto.us, subdomain: null, og_tags: [{ id: 1, property: 'og:title', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 2, property: 'og:site_name', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 3, property: 'og:description', content: '135 Bedford St. Stamford — 203-973-7888', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 4, property: 'og:image', content: 'https://d1fdloi71mui9q.cloudfront.net/j9tcG8gS1Ookoai6JT0i_32a6b9a556ac321e5607cc9e8a8bd8495', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 5, property: 'og:type', content: website, created_at: '2020-11-23T16:08:32.000000Z' }, { id: 6, property: 'og:url', content: 'http://linkto.us/bedford', created_at: '2020-11-23T16:09:10.000000Z' }], pixel_tracks: [], scripts: [], signals: [], interstitials: [], destinations: [{ id: 1, uri: 'https://ct.winlocal.io/bedford', is_default: 1, conditions: [] }] }, { id: 1, shortlink: linkto.us/bedford, domain: linkto.us, subdomain: null, og_tags: [{ id: 1, property: 'og:title', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 2, property: 'og:site_name', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 3, property: 'og:description', content: '135 Bedford St. Stamford — 203-973-7888', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 4, property: 'og:image', content: 'https://d1fdloi71mui9q.cloudfront.net/j9tcG8gS1Ookoai6JT0i_32a6b9a556ac321e5607cc9e8a8bd8495', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 5, property: 'og:type', content: website, created_at: '2020-11-23T16:08:32.000000Z' }, { id: 6, property: 'og:url', content: 'http://linkto.us/bedford', created_at: '2020-11-23T16:09:10.000000Z' }], pixel_tracks: [], scripts: [], signals: [], interstitials: [], destinations: [{ id: 1, uri: 'https://ct.winlocal.io/bedford', is_default: 1, conditions: [] }] }] properties: data: { type: array, example: [{ id: 1, shortlink: linkto.us/bedford, domain: linkto.us, subdomain: null, og_tags: [{ id: 1, property: 'og:title', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 2, property: 'og:site_name', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 3, property: 'og:description', content: '135 Bedford St. Stamford — 203-973-7888', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 4, property: 'og:image', content: 'https://d1fdloi71mui9q.cloudfront.net/j9tcG8gS1Ookoai6JT0i_32a6b9a556ac321e5607cc9e8a8bd8495', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 5, property: 'og:type', content: website, created_at: '2020-11-23T16:08:32.000000Z' }, { id: 6, property: 'og:url', content: 'http://linkto.us/bedford', created_at: '2020-11-23T16:09:10.000000Z' }], pixel_tracks: [], scripts: [], signals: [], interstitials: [], destinations: [{ id: 1, uri: 'https://ct.winlocal.io/bedford', is_default: 1, conditions: [] }] }, { id: 1, shortlink: linkto.us/bedford, domain: linkto.us, subdomain: null, og_tags: [{ id: 1, property: 'og:title', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 2, property: 'og:site_name', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 3, property: 'og:description', content: '135 Bedford St. Stamford — 203-973-7888', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 4, property: 'og:image', content: 'https://d1fdloi71mui9q.cloudfront.net/j9tcG8gS1Ookoai6JT0i_32a6b9a556ac321e5607cc9e8a8bd8495', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 5, property: 'og:type', content: website, created_at: '2020-11-23T16:08:32.000000Z' }, { id: 6, property: 'og:url', content: 'http://linkto.us/bedford', created_at: '2020-11-23T16:09:10.000000Z' }], pixel_tracks: [], scripts: [], signals: [], interstitials: [], destinations: [{ id: 1, uri: 'https://ct.winlocal.io/bedford', is_default: 1, conditions: [] }] }], items: { type: object } } tags: - Shortlinks post: summary: 'Create shortlink' description: "Comfortable endpoint to create shortlink with with all its components like Interstitials, OgTag, etc..\n" parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: { id: 1, shortlink: linkto.us/bedford, domain: linkto.us, subdomain: null, og_tags: [{ id: 1, property: 'og:title', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 2, property: 'og:site_name', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 3, property: 'og:description', content: '135 Bedford St. Stamford — 203-973-7888', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 4, property: 'og:image', content: 'https://d1fdloi71mui9q.cloudfront.net/j9tcG8gS1Ookoai6JT0i_32a6b9a556ac321e5607cc9e8a8bd8495', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 5, property: 'og:type', content: website, created_at: '2020-11-23T16:08:32.000000Z' }, { id: 6, property: 'og:url', content: 'http://linkto.us/bedford', created_at: '2020-11-23T16:09:10.000000Z' }], pixel_tracks: [], scripts: [], signals: [], interstitials: [], destinations: [{ id: 1, uri: 'https://ct.winlocal.io/bedford', is_default: 1, conditions: [] }] } properties: data: { type: object, example: { id: 1, shortlink: linkto.us/bedford, domain: linkto.us, subdomain: null, og_tags: [{ id: 1, property: 'og:title', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 2, property: 'og:site_name', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 3, property: 'og:description', content: '135 Bedford St. Stamford — 203-973-7888', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 4, property: 'og:image', content: 'https://d1fdloi71mui9q.cloudfront.net/j9tcG8gS1Ookoai6JT0i_32a6b9a556ac321e5607cc9e8a8bd8495', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 5, property: 'og:type', content: website, created_at: '2020-11-23T16:08:32.000000Z' }, { id: 6, property: 'og:url', content: 'http://linkto.us/bedford', created_at: '2020-11-23T16:09:10.000000Z' }], pixel_tracks: [], scripts: [], signals: [], interstitials: [], destinations: [{ id: 1, uri: 'https://ct.winlocal.io/bedford', is_default: 1, conditions: [] }] } } tags: - Shortlinks requestBody: required: true content: application/json: schema: type: object properties: alias: type: string description: 'Unique part of shortlink occurs after domain first slash.' example: test default_destination_uri: type: string description: 'Default shortlink destinations. End user will be redirect there when will not meet another conditional based destinations.' example: 'https://www.winlocalnow.com' subdomain_id: type: integer description: '(Required if subdomain and domain are not present) Id of subdomain.' example: 1 domain: type: string description: '(Requierd if subdomain_id is not present) Domain.' example: yourdomian.com hide_nav_bar: type: string description: 'The value must be one of 1, 1, or true.' example: '1' subdomain: type: string description: '(Requierd if subdomain_id is not present) Subdomain.' example: links external_id: type: integer description: 'Id from your system related to shortlink. You will get this each time you retrieve shortlink info.' example: 111 external_metadata: type: string description: 'Data from your system related to shortlink. The value must be a valid JSON string.' example: { systemId: Qh7f43hXfufLWdsaPQsab43u, timestamp: 1607186812 } og_tags: type: array description: 'List of OgTags.' example: [[], []] items: { type: object, properties: { property: { type: string, description: 'OgTag type (read more on ogp.me).', example: 'og:title' }, content: { type: string, description: 'OgTag value for given OgTag type.', example: 'My title seen on Facebook' } }, required: [property, content] } pixel_tracks: type: array description: 'List of Pixel Track actions.' example: [[], []] items: { type: object, properties: { action: { type: string, description: 'Pixel Track action. It will be provided in fbq("track","[action]"...) script.', example: quisquam }, attributes: { type: array, description: '', example: [[]], items: { type: object, properties: { key: { type: string, description: '', example: placeat }, value: { type: string, description: '', example: { } } } } }, 'attributes[]': { type: array, description: 'Array of key-value objects which will be passed to fbq("track","[action], [attributes]).', example: [[], []], items: { type: object } } }, required: [action, 'attributes[]'] } linkedin_pixels: type: 'object[].linkedin_partner_id' description: 'string required Id of Linkedin Partnership.' example: et scripts: type: array description: 'List of scripts which you want to run during redirections' example: [[], []] items: { type: object, properties: { script: { type: string, description: 'Script which will be run if end-user has javascript enabled.', example: et }, noscript: { type: string, description: 'The <noscript> tag defines an alternate content to be displayed to users that have disabled scripts in their browser or have a browser that doesn''t support script.', example: molestiae } }, required: [script, noscript] } interstitials: type: array description: '' example: [[]] items: { type: object, properties: { type: { type: string, description: 'The value must be one of IFRAME, POPUP, or HTML.', example: HTML }, url: { type: string, description: 'The value must be a valid URL.', example: 'http://koepp.net/omnis-aut-doloribus-et-impedit' }, html: { type: string, description: '', example: { } }, title: { type: string, description: '', example: { } }, body: { type: string, description: '', example: { } }, is_default: { type: string, description: 'The value must be one of 1, 1, or true.', example: 'true' }, conditions: { type: array, description: '', example: [[]], items: { type: object, properties: { type: { type: string, description: 'The value must be one of DATE, TIME, CONTINENT, COUNTRY, REGION, CITY, RETURNING, LATLONG, TEMPERATURE, or WEATHER.', example: WEATHER } } } } } } signals: type: array description: 'Signals registered for this shortlink.' example: null items: { type: object, properties: { method: { type: string, description: 'The value must be one of EMAIL, POST, or GET.', example: POST }, events: { type: array, description: 'The value must be one of shortlink.entered or destination.redirected.', example: [destination.redirected, shortlink.entered], items: { type: string } }, conditions: { type: array, description: '', example: [[]], items: { type: object, properties: { type: { type: string, description: 'The value must be one of DATE, TIME, CONTINENT, COUNTRY, REGION, CITY, RETURNING, LATLONG, TEMPERATURE, or WEATHER.', example: CONTINENT } } } }, is_default: { type: string, description: 'The value must be one of 1, 1, or true.', example: 'true' } }, required: [method] } destinations: type: array description: 'List of shortlink destinations.' example: [[], []] items: { type: object, properties: { uri: { type: string, description: 'The final redirect link.', example: sequi }, conditions: { type: array, description: '', example: [officia], items: { type: string } }, is_default: { type: boolean, description: 'Set this destination to default. (It overwrites default_destination_uri).', example: true }, 'conditions[]': { type: array, description: 'Required if is_default is not set. Conditions are dynamic and validation is based on type property.', example: [[], []], items: { type: object } } }, required: [uri] } heads: type: array description: 'List of html object which will be placed in between tags in redirection page. Please do not use it to place a scripts. Scripts should be make as a scripts.' example: [[], []] items: { type: object, properties: { head: { type: string, description: 'Full tag.', example: harum } }, required: [head] } required: - alias - default_destination_uri '/api/shortlinks/{shortlink}': get: summary: 'Get single shortlink' description: 'Returns single shortlinks assigned to application with all conditions.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: { id: 1, shortlink: linkto.us/bedford, domain: linkto.us, subdomain: null, og_tags: [{ id: 1, property: 'og:title', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 2, property: 'og:site_name', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 3, property: 'og:description', content: '135 Bedford St. Stamford — 203-973-7888', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 4, property: 'og:image', content: 'https://d1fdloi71mui9q.cloudfront.net/j9tcG8gS1Ookoai6JT0i_32a6b9a556ac321e5607cc9e8a8bd8495', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 5, property: 'og:type', content: website, created_at: '2020-11-23T16:08:32.000000Z' }, { id: 6, property: 'og:url', content: 'http://linkto.us/bedford', created_at: '2020-11-23T16:09:10.000000Z' }], pixel_tracks: [], scripts: [], signals: [], interstitials: [], destinations: [{ id: 1, uri: 'https://ct.winlocal.io/bedford', is_default: 1, conditions: [] }] } properties: data: { type: object, example: { id: 1, shortlink: linkto.us/bedford, domain: linkto.us, subdomain: null, og_tags: [{ id: 1, property: 'og:title', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 2, property: 'og:site_name', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 3, property: 'og:description', content: '135 Bedford St. Stamford — 203-973-7888', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 4, property: 'og:image', content: 'https://d1fdloi71mui9q.cloudfront.net/j9tcG8gS1Ookoai6JT0i_32a6b9a556ac321e5607cc9e8a8bd8495', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 5, property: 'og:type', content: website, created_at: '2020-11-23T16:08:32.000000Z' }, { id: 6, property: 'og:url', content: 'http://linkto.us/bedford', created_at: '2020-11-23T16:09:10.000000Z' }], pixel_tracks: [], scripts: [], signals: [], interstitials: [], destinations: [{ id: 1, uri: 'https://ct.winlocal.io/bedford', is_default: 1, conditions: [] }] } } tags: - Shortlinks delete: summary: 'Delete shortlink' description: "You can delete existing shortlink. This action can not be undone!\nShortlink statistics will not be accessible from API." parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: { } tags: - Shortlinks parameters: - in: path name: shortlink description: 'Existing Shortlink Id.' example: '1' required: true schema: type: string '/api/shortlinks/external/{external_id}': get: summary: 'Get shortlinks via external_id' description: 'Returns all shortlinks with given external_id.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: [{ id: 1, shortlink: linkto.us/bedford, domain: linkto.us, subdomain: null, og_tags: [{ id: 1, property: 'og:title', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 2, property: 'og:site_name', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 3, property: 'og:description', content: '135 Bedford St. Stamford — 203-973-7888', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 4, property: 'og:image', content: 'https://d1fdloi71mui9q.cloudfront.net/j9tcG8gS1Ookoai6JT0i_32a6b9a556ac321e5607cc9e8a8bd8495', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 5, property: 'og:type', content: website, created_at: '2020-11-23T16:08:32.000000Z' }, { id: 6, property: 'og:url', content: 'http://linkto.us/bedford', created_at: '2020-11-23T16:09:10.000000Z' }], pixel_tracks: [], scripts: [], signals: [], interstitials: [], destinations: [{ id: 1, uri: 'https://ct.winlocal.io/bedford', is_default: 1, conditions: [] }], stats: { id: 1, breakdown: OVERALL, shortlink: linkto.us/bedford, stats: { base: { entries: [{ date: overall, entries: 11619, unique_entries: 6505, source: { facebook: 3, instagram: 0, twitter: 0, linkedin: 0, direct: 11615 } }], destinations: [{ id: 1, uri: 'https://ct.winlocal.io/bedford', redirections: { date: overall, redirections: 2678 } }] } } } }, { id: 1, shortlink: linkto.us/bedford, domain: linkto.us, subdomain: null, og_tags: [{ id: 1, property: 'og:title', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 2, property: 'og:site_name', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 3, property: 'og:description', content: '135 Bedford St. Stamford — 203-973-7888', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 4, property: 'og:image', content: 'https://d1fdloi71mui9q.cloudfront.net/j9tcG8gS1Ookoai6JT0i_32a6b9a556ac321e5607cc9e8a8bd8495', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 5, property: 'og:type', content: website, created_at: '2020-11-23T16:08:32.000000Z' }, { id: 6, property: 'og:url', content: 'http://linkto.us/bedford', created_at: '2020-11-23T16:09:10.000000Z' }], pixel_tracks: [], scripts: [], signals: [], interstitials: [], destinations: [{ id: 1, uri: 'https://ct.winlocal.io/bedford', is_default: 1, conditions: [] }], stats: { id: 1, breakdown: OVERALL, shortlink: linkto.us/bedford, stats: { base: { entries: [{ date: overall, entries: 11619, unique_entries: 6505, source: { facebook: 3, instagram: 0, twitter: 0, linkedin: 0, direct: 11615 } }], destinations: [{ id: 1, uri: 'https://ct.winlocal.io/bedford', redirections: { date: overall, redirections: 2678 } }] } } } }] links: { first: '/?page=1', last: '/?page=1', prev: null, next: null } meta: { current_page: 1, from: 1, last_page: 1, path: /, per_page: '15', to: 2, total: 2 } properties: data: { type: array, example: [{ id: 1, shortlink: linkto.us/bedford, domain: linkto.us, subdomain: null, og_tags: [{ id: 1, property: 'og:title', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 2, property: 'og:site_name', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 3, property: 'og:description', content: '135 Bedford St. Stamford — 203-973-7888', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 4, property: 'og:image', content: 'https://d1fdloi71mui9q.cloudfront.net/j9tcG8gS1Ookoai6JT0i_32a6b9a556ac321e5607cc9e8a8bd8495', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 5, property: 'og:type', content: website, created_at: '2020-11-23T16:08:32.000000Z' }, { id: 6, property: 'og:url', content: 'http://linkto.us/bedford', created_at: '2020-11-23T16:09:10.000000Z' }], pixel_tracks: [], scripts: [], signals: [], interstitials: [], destinations: [{ id: 1, uri: 'https://ct.winlocal.io/bedford', is_default: 1, conditions: [] }], stats: { id: 1, breakdown: OVERALL, shortlink: linkto.us/bedford, stats: { base: { entries: [{ date: overall, entries: 11619, unique_entries: 6505, source: { facebook: 3, instagram: 0, twitter: 0, linkedin: 0, direct: 11615 } }], destinations: [{ id: 1, uri: 'https://ct.winlocal.io/bedford', redirections: { date: overall, redirections: 2678 } }] } } } }, { id: 1, shortlink: linkto.us/bedford, domain: linkto.us, subdomain: null, og_tags: [{ id: 1, property: 'og:title', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 2, property: 'og:site_name', content: 'Bedford Hall Craft Kitchen & Bar', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 3, property: 'og:description', content: '135 Bedford St. Stamford — 203-973-7888', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 4, property: 'og:image', content: 'https://d1fdloi71mui9q.cloudfront.net/j9tcG8gS1Ookoai6JT0i_32a6b9a556ac321e5607cc9e8a8bd8495', created_at: '2020-11-23T16:00:30.000000Z' }, { id: 5, property: 'og:type', content: website, created_at: '2020-11-23T16:08:32.000000Z' }, { id: 6, property: 'og:url', content: 'http://linkto.us/bedford', created_at: '2020-11-23T16:09:10.000000Z' }], pixel_tracks: [], scripts: [], signals: [], interstitials: [], destinations: [{ id: 1, uri: 'https://ct.winlocal.io/bedford', is_default: 1, conditions: [] }], stats: { id: 1, breakdown: OVERALL, shortlink: linkto.us/bedford, stats: { base: { entries: [{ date: overall, entries: 11619, unique_entries: 6505, source: { facebook: 3, instagram: 0, twitter: 0, linkedin: 0, direct: 11615 } }], destinations: [{ id: 1, uri: 'https://ct.winlocal.io/bedford', redirections: { date: overall, redirections: 2678 } }] } } } }], items: { type: object } } links: { type: object, example: { first: '/?page=1', last: '/?page=1', prev: null, next: null } } meta: { type: object, example: { current_page: 1, from: 1, last_page: 1, path: /, per_page: '15', to: 2, total: 2 } } tags: - Shortlinks parameters: - in: path name: external_id description: External_id example: 7 required: true schema: type: integer /api/shortlinks/check: post: summary: 'Check alias' description: "You can check alias availability in scope of domain or subdomain.\nResponse with status code 200 means that alias is available.\nResponse with status code 422 means that alias has been already taken." parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '200' content: application/json: schema: type: object example: data: { status: available, shortlink: www.linkto.us/test } properties: data: { type: object, example: { status: available, shortlink: www.linkto.us/test } } 422: description: '422' content: application/json: schema: type: object example: message: 'The given data was invalid.' errors: { alias: ['Shortlink alias must be unique in scope of subdomain.'] } properties: message: { type: string, example: 'The given data was invalid.' } errors: { type: object, example: { alias: ['Shortlink alias must be unique in scope of subdomain.'] } } 403: description: '403' content: application/json: schema: type: object example: message: 'This action is unauthorized.' properties: message: { type: string, example: 'This action is unauthorized.' } tags: - Shortlinks requestBody: required: true content: application/json: schema: type: object properties: alias: type: string description: 'Unique part of shortlink occurs after domain first slash.' example: test domain: type: string description: '(Requierd if domain_id is not present) Domain.' example: linkto.us domain_id: type: integer description: '(Requierd if domain is not present) Domain Id.' example: 1 subdomain: type: string description: 'Use specific subdomain for check.' example: eum required: - alias '/api/shortlinks/{shortlink}/signals': get: summary: 'Get shortlink all signals.' description: 'Get list of all signals for certain shortlink' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: [{ id: 1, method: POST, events: [shortlink.entered, destination.redirected], is_default: true, created_at: '2021-01-21T21:00:35.000000Z', conditions: [] }, { id: 1, method: POST, events: [shortlink.entered, destination.redirected], is_default: true, created_at: '2021-01-21T21:00:35.000000Z', conditions: [] }] properties: data: { type: array, example: [{ id: 1, method: POST, events: [shortlink.entered, destination.redirected], is_default: true, created_at: '2021-01-21T21:00:35.000000Z', conditions: [] }, { id: 1, method: POST, events: [shortlink.entered, destination.redirected], is_default: true, created_at: '2021-01-21T21:00:35.000000Z', conditions: [] }], items: { type: object } } tags: - Signals post: summary: 'Create Signal for shortlink.' description: 'You can create new Signal for existing shortlink.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: { id: 1, method: POST, events: [shortlink.entered, destination.redirected], is_default: true, created_at: '2021-01-21T21:00:35.000000Z', conditions: [] } properties: data: { type: object, example: { id: 1, method: POST, events: [shortlink.entered, destination.redirected], is_default: true, created_at: '2021-01-21T21:00:35.000000Z', conditions: [] } } tags: - Signals requestBody: required: true content: application/json: schema: type: object properties: method: type: string description: 'The value must be one of EMAIL, POST, or GET.' example: POST events: type: array description: 'The value must be one of shortlink.entered or destination.redirected.' example: [shortlink.entered, shortlink.entered] items: { type: string } is_default: type: boolean description: '(Required if conditions are not set).' example: false conditions: type: array description: '(Required if is_default is not set).' example: [[], []] items: { type: object, properties: { type: { type: string, description: 'The value must be one of DATE, TIME, CONTINENT, COUNTRY, REGION, CITY, RETURNING, LATLONG, TEMPERATURE, or WEATHER.', example: CITY }, operator: { type: string, description: 'The value must be one of BETWEEN, EQUAL, LESS THAN, GREATER THAN, or IN RANGE.', example: EQUAL }, first_date: { type: string, description: '(Required if type is DATE). Date format: Y-m-d H:i:s', example: rerum }, second_date: { type: string, description: '(Required if type is DATE and operator is BETWEEN). Date format: Y-m-d H:i:s', example: occaecati }, first_time: { type: string, description: '(Required if type is TIME). Time format: h:i:s A', example: molestias }, second_time: { type: string, description: '(Required if type is TIME and operator is BETWEEN). Time format: h:i:s A', example: illum }, continent_code: { type: string, description: '(Required if type is CONTINENT and continent is not present). 2 characters long.', example: aut }, continent: { type: string, description: '(Required if type is CONTINENT and continent_code is not present).', example: tenetur }, country_code: { type: string, description: '(Required if type is COUNTRY and country is not present). 2 characters long.', example: quo }, country: { type: string, description: '(Required if type is COUNTRY and country_code is not present).', example: delectus }, region_code: { type: string, description: '(Required if type is REGION and region is not present). 2 characters long.', example: recusandae }, region: { type: string, description: '(Required if type is REGION and region_code is not present).', example: quibusdam }, latitude: { type: numeric, description: '(Required if type is LATLONG). Between: -90.0000000,90.0000000', example: est }, longitude: { type: numeric, description: '(Required if type is LATLONG). Between: -180.0000000,180.0000000', example: corrupti }, range: { type: integer, description: '(Required if type is LATLONG). Between: 10, 10000. Value in miles.', example: 5 }, temperature: { type: integer, description: '(Required if type is TEMPERATURE). Between: -60, 60. Value in Celsius.', example: 19 }, weather: { type: string, description: '(Required if type is WEATHER). In: SUNNY, CLEAN, RAINY, FOGGY, SNOWY, CLOUDY, STORMY, HAIL', example: non } }, required: [type, operator] } required: - method - events parameters: - in: path name: shortlink description: 'Shortlink Id.' example: 1 required: true schema: type: integer '/api/shortlinks/{shortlink}/signals/{signal}': put: summary: 'Update Signal for shortlink.' description: 'You can update existing signal.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: { id: 1, method: POST, events: [shortlink.entered, destination.redirected], is_default: true, created_at: '2021-01-21T21:00:35.000000Z', conditions: [] } properties: data: { type: object, example: { id: 1, method: POST, events: [shortlink.entered, destination.redirected], is_default: true, created_at: '2021-01-21T21:00:35.000000Z', conditions: [] } } tags: - Signals requestBody: required: true content: application/json: schema: type: object properties: method: type: string description: 'The value must be one of EMAIL, POST, or GET.' example: GET events: type: array description: 'The value must be one of shortlink.entered or destination.redirected.' example: [destination.redirected, destination.redirected] items: { type: string } required: - method - events delete: summary: 'Delete Signal for shortlink.' description: 'You can delete existing Signal. This action can not be undone!' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '200' content: text/plain: schema: type: string example: '{[]}' tags: - Signals parameters: - in: path name: shortlink description: 'Shortlink Id.' example: 14 required: true schema: type: integer - in: path name: signal description: 'Signal which will be updated.' example: 6 required: true schema: type: integer /api/app/stats: get: summary: 'Application statistics' description: 'Show all available statistics for application.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: { id: 3, breakdown: OVERALL, application: 'John Lim Application', stats: { base: { entries: { date: overall, entries: 22622, unique_entries: 12594, source: { facebook: 3, instagram: 0, twitter: 0, linkedin: 0, direct: 22617 } } } } } properties: data: { type: object, example: { id: 3, breakdown: OVERALL, application: 'John Lim Application', stats: { base: { entries: { date: overall, entries: 22622, unique_entries: 12594, source: { facebook: 3, instagram: 0, twitter: 0, linkedin: 0, direct: 22617 } } } } } } tags: - Stats '/api/shortlinks/{shortlink}/stats': get: summary: 'Shortlink statistics' description: 'Show all available statistics for shortlink.' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: application/json: schema: type: object example: data: { id: 1, breakdown: OVERALL, shortlink: linkto.us/bedford, stats: { base: { entries: [{ date: overall, entries: 11619, unique_entries: 6505, source: { facebook: 3, instagram: 0, twitter: 0, linkedin: 0, direct: 11615 } }], destinations: [{ id: 1, uri: 'https://ct.winlocal.io/bedford', redirections: { date: overall, redirections: 2678 } }] } } } properties: data: { type: object, example: { id: 1, breakdown: OVERALL, shortlink: linkto.us/bedford, stats: { base: { entries: [{ date: overall, entries: 11619, unique_entries: 6505, source: { facebook: 3, instagram: 0, twitter: 0, linkedin: 0, direct: 11615 } }], destinations: [{ id: 1, uri: 'https://ct.winlocal.io/bedford', redirections: { date: overall, redirections: 2678 } }] } } } } tags: - Stats requestBody: required: false content: application/json: schema: type: object properties: breakdown: type: string description: 'The value must be one of OVERALL, DAILY, or HOURLY.' example: DAILY startDate: type: string description: 'The value must be a valid date.' example: '2021-08-03T11:48:53+0000' endDate: type: string description: 'The value must be a valid date.' example: '2021-08-03T11:48:53+0000' parameters: - in: path name: shortlink description: 'Existing Shortlink Id.' example: '1' required: true schema: type: string components: securitySchemes: default: type: http scheme: bearer description: '' security: - default: []