{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"18d3ea3f-5b92-4edc-8825-04ed8659ee55","name":"Swipe APIs","description":"Welcome to <a href=\"https://swipe.io/issuing/\">Swipe Issuing</a>.  The purpose of this documentation is to ensure that every user is able to properly integrate a full card issuing or fiat banking solution to their system through our series of simple easy-to-use sets of APIs. Here you will find an explanation of how our products work and how to integrate with them.\n\n# Query parameters for listings\n\nEvery API in our system that provides a list of records has available a set of filters and parameters to make the listings represent the records they are actually looking for. For any GET call for listing records, the following query parameters will be available:\n\n- with[] \n\t- This parameter will let the user who is requesting it add any desired relation the resource has in the API so it lists nested on the JSON structure. It can be sent as many as the resource has available, it is also possible to access subsequent relations by separating the names by \".\" (dot).\n\t- An example of a request would be {{url}}/api/v2/entities?with[]=documents&with[]=funds&with[]=cards, this  request would query for all entities and add to the structure thier documents, funds, and cards relations.\n\t\n- and[] \n\t- This query parameter will enable the user to filter the records by applying a \"AND\" conditional, meaning that the search needs to satisfy all values so it loads on the response, it is possible to use multiple values for the same attribute and use as many and as needed. An example would be and[type][][eq]=receive.\n\t\n- or[]\n\t- This query parameter will enable the user to filter the records by applying a \"OR\" conditional, meaning that the search needs to satisfy at least one or more values so it loads on the response, it is possible to use multiple values for the same attribute and use as many `ors` as needed. An example would be or[tierLevel][][eq]=1.\n\t\n- in[]\n\t- This query parameter will enable the user to filter the records by applying a \"IN\" conditional, meaning that the attribute needs to satisfy at least one or more values within the array so it loads on the response, it is possible to use multiple values for the same attribute and use as many `ors` as needed. An example would be in[tierLevel][]=1&in[tierLevel][]=2&in[tierLevel][]=3.\t\n\t\n- date[]\n\t- This query parameter will enable the user to filter the records by applying a \"DATE\" conditional, meaning that the search needs to satisfy a certain date conditional so it loads on the response, it is possible to use multiple values for same attribute and use as many ors as needed. An example would be `date[created_at][][gt]=2018-01-01&date[created_at][][lt]=2018-01-31`.\n\nIt is possible to use various type of operators, below is the mapping for each one:\n\n- eq => Equal\n- nq => Not Equal\n- gt => Greater than\n- lt => Less than\n- gte => Greater than or equal to\n- lte => Less than or equal to\n- like => Like conditinal\n\n# Request and Response structure\n\nThe API accepts as a request a raw JSON body containing the data according to the structure of each object from the API that is being requested. In this documentation, each API has the data structure defined for each API that should be strictly followed. \n\nThe response structure of the API follows 2 possible structures based on the `success` flag which indicates if the request was successful or not. \n\nThe `success` flag indicates the following:\n1. That the request is properly formatted and acceptable (security headers, data structure, etc.)\n2. That the data was properly committed to our database without validation errors\n\nThe `success` flag should not be conflicted with the state or values of the record which was created (like a card order that was created with the `status` set to `failed`), the client needs to implement on their side the required logic to properly parse the data created and analyze the relevance of keeping track of the ids of data committed in our database with their system. Below are further examples of our successful/failure responses.\n\n**Successful Response**\n\nAny time the response is successful in a create or update request you will receive the `data` object containing the record recently created or updated together with any relevant nested relations. In the below example we have a successful card order creation with all result records pointing to that card order.\n\n```\n{\n  \"success\": true,\n  \"data\": {\n        \"id\": 43,\n        \"entity_id\": 7,\n        \"card_id\": 1,\n        \"card_upgrade_id\": null,\n        \"asset_id\": null,\n        \"exchange_quote_id\": null,\n        \"reserve_entry_id\": null,\n        \"type\": \"issue\",\n        \"amount\": null,\n        \"reference\": null,\n        \"status\": \"failed\",\n        \"created_at\": \"2020-06-28 14:57:17.297761\",\n        \"created_by_id\": 6,\n        \"created_from_id\": 1,\n        \"updated_at\": \"2020-06-28 14:57:17.297761\",\n        \"updated_by_id\": 6,\n        \"updated_from_id\": 1,\n        \"results\": [\n            {\n                \"id\": 37,\n                \"card_order_id\": 43,\n                \"platform\": \"contis\",\n                \"code\": \"internal\",\n                \"message\": \"The entity already has an issued consumer id for this platform, only one consumer id is allowed for physical cards on this platform\",\n                \"created_at\": \"2020-06-28 14:57:17.344219\",\n                \"created_by_id\": 6,\n                \"created_from_id\": 1,\n                \"updated_at\": \"2020-06-28 14:57:17.344219\",\n                \"updated_by_id\": 6,\n                \"updated_from_id\": 1\n            }\n        ]\n    }\n}\n```\n\n**Failed Response**\n\nWhenever the request fails, the response will have an error array containing all relevant messages as to why the request has failed\n\n```\n{\n    \"success\": false,\n    \"error\": [\n        {\n            \"message\": \"The selected status is invalid.\"\n        }\n    ]\n}\n```","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"10096142","team":655733,"collectionId":"18d3ea3f-5b92-4edc-8825-04ed8659ee55","publishedId":"T1LHJVWn","public":true,"publicUrl":"https://documenter-api.postman.tech/view/10096142/T1LHJVWn","privateUrl":"https://go.postman.co/documentation/10096142-18d3ea3f-5b92-4edc-8825-04ed8659ee55","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.10.0","publishDate":"2020-08-07T15:46:02.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/43568c3b9d7e1412c442f3ba30d846aed3ea460feb2b1efa3a52ddf23d58fd6e","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/T1LHJVWn"}