{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/customers/:customer_id","auth":"required","params":[{"name":"customer_id","type":"int","default":"","desc":"Add this parameter to get the info on specific customer","required":false,"in":"path","ref":"","_id":"5639cd9edaf1c00d00136ccd"},{"name":"filter[email]","type":"string","default":"","desc":"Filter by customers' email. See [Filtration](#section-filtration) below.","required":false,"in":"query","ref":"","_id":"56052bd524c9d80d00155113"},{"name":"filter[first_name]","type":"string","default":"","desc":"Filter by customers' first name. See [Filtration](#section-filtration) below.","required":false,"in":"query","ref":"","_id":"5639ed4edaf1c00d00136cf7"},{"name":"filter[last_name]","type":"string","default":"","desc":"Filter by customers' last name. See [Filtration](#section-filtration) below.","required":false,"in":"query","ref":"","_id":"5639ed4edaf1c00d00136cf6"},{"name":"filter[company]","type":"string","default":"","desc":"Filter by customers' company. See [Filtration](#section-filtration) below.","required":false,"in":"query","ref":"","_id":"57c048d1167729320066d6ae"},{"name":"filter[phone]","type":"string","default":"","desc":"Filter by customers' phone number. See [Filtration](#section-filtration) below.","required":false,"in":"query","ref":"","_id":"57c048d1167729320066d6ad"},{"name":"filter[address]","type":"string","default":"","desc":"Filter by customers' address. See [Filtration](#section-filtration) below.","required":false,"in":"query","ref":"","_id":"57c048d1167729320066d6ac"},{"name":"filter[key]","type":"string","default":"","desc":"Filter by customers' activation key. See [Filtration](#section-filtration) below.","required":false,"in":"query","ref":"","_id":"5639eddf3539050d000821cd"},{"name":"filter[identifier]","type":"string","default":"","desc":"Filter by customers' computer ID. See [Filtration](#section-filtration) below.","required":false,"in":"query","ref":"","_id":"563a01bcc47c3f0d009b5265"},{"name":"filter[order_id]","type":"string","default":"","desc":"Filter by customers' DevMate order ID. See [Filtration](#section-filtration) below.","required":false,"in":"query","ref":"","_id":"563a01bcc47c3f0d009b5264"},{"name":"filter[activation_id]","type":"string","default":"","desc":"Filter by customers' activation ID. See [Filtration](#section-filtration) below.","required":false,"in":"query","ref":"","_id":"563a04aec63a22190018dc08"},{"name":"filter[invoice]","type":"string","default":"","desc":"Filter by billing order ID. See [Filtration](#section-filtration) below.","required":false,"in":"query","ref":"","_id":"563a04aec63a22190018dc07"},{"name":"offset","type":"int","default":"","desc":"Get selected customers starting from the number specified.","required":false,"in":"query","ref":"","_id":"56052bd524c9d80d00155112"},{"name":"limit","type":"int","default":"","desc":"Limits the number of customers within one server response.","required":false,"in":"query","ref":"","_id":"56052bd524c9d80d00155111"},{"name":"with","type":"string","default":"","desc":"Get customers with licenses","required":false,"in":"query","ref":"","_id":"56e7f439b662631700974e3d"}],"examples":{"codes":[{"name":"Filtered cutomers list","code":"curl -H \"Authorization:Token b98f08d1c44cd5259dd70dc295e61187af45bffd23036f909919e608bdd8a592\" \"https://public-api.devmate.com/v2/customers?filter\\[email\\]=acme.corp&filter\\[first_name\\]=John&limit=1&offset=0\"","language":"curl"},{"name":"Customer info by ID","language":"curl","code":"curl -H \"Authorization:Token b98f08d1c44cd5259dd70dc295e61187af45bffd23036f909919e608bdd8a592\" \"https://public-api.devmate.com/v2/customers/45\""}]},"method":"get","results":{"codes":[{"code":"{\n \"data\": [\n {\n \"date_added\": 1444047973,\n \"email\": \"jdoe:::at:::acme.corp\",\n \"first_name\": \"John\",\n \"id\": 45,\n \"last_name\": \"Doe\",\n \"company\": \"MacPaw\",\n\t\t\t\t \"phone\": \"5553423322\",\n\t\t\t\t \"address\": \"Madison Ave. 11\",\n \"note\": \"Our valuable customer\"\n }\n ],\n \"meta\": {\n \"total\": 1\n }\n}","language":"json","status":200,"name":"Filtered customers list"},{"name":"Customer info by ID","code":"{\n \"data\": {\n \"date_added\": 1444047973,\n \"email\": \"[email protected]\",\n \"first_name\": \"John\",\n \"id\": 45,\n \"last_name\": \"Doe\",\n \t\"company\": \"MacPaw\",\n \t\t\"phone\": \"5553423322\",\n \t\t \"address\": \"Madison Ave. 11\",\n\n \"licenses\": [\n {\n \"activation_key\": \"id922290779324odr\",\n \"activations_total\": 2,\n \"activations_used\": 0,\n \"campaign\": \"\",\n \"expiration_date\": null,\n \"history\": [\n {\n \"note\": \"\",\n \"timestamp\": 1444047973,\n \"type\": 2,\n \"user_name\": \"\"\n }\n ],\n \"id\": 1075,\n \"invoice\": \"\",\n \"is_subscription\": false,\n \"license_type_id\": 36,\n \"license_type_name\": \"Lifetime License\",\n \"products\": [\n {\n \"bundle_id\": \"com.acme.MyNewApp\",\n \"id\": 1,\n \"name\": \"MyNewApp\",\n \"use_offline_license\": false\n }\n ],\n \"status\": 1\n }\n ],\n \"note\": \"Our valuable customer\"\n }\n}","language":"json","status":200},{"code":"{\n \"errors\": [\n {\n \"title\": \"Unauthorized\"\n }\n ]\n}","language":"json","status":401},{"status":404,"language":"json","code":"{\n \"errors\": [\n {\n \"title\": \"Server error.\",\n \"detail\": \"Customer with id \\\"2349874\\\" not found.\"\n }\n ]\n}"}]},"settings":""},"next":{"description":"","pages":[]},"title":"Get Customer(s) Info","type":"endpoint","slug":"get-customers","excerpt":"","body":"This method is used to get information about customer or get the customers list with the possibility of filtration.\n\n#Response Codes\n\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Code\",\n \"h-1\": \"Description\",\n \"0-0\": \"`200`\",\n \"0-1\": \"All operations were completed. Response returned in JSON format\",\n \"1-0\": \"`400`\",\n \"1-1\": \"Request parameter is absent or incorrect. For example, wrong email address\",\n \"2-0\": \"`404`\",\n \"2-1\": \"Customer with specified ID was not found\",\n \"3-0\": \"`500`\",\n \"3-1\": \"Server error\"\n },\n \"cols\": 2,\n \"rows\": 4\n}\n[/block]\n#Single Customer Info\nIf you want to get the info about specific customer, specify the customer ID in the URL like this (don't forget about your token!):\n\n````\nhttps://public-api.devmate.com/v2/customers/<customer_id>\n````\n\n#Get Customers List\n\nTo get the complete list of customers, send a GET request:\n\n````\nhttps://public-api.devmate.com/v2/customers\n````\n\n#Filtration\n\nYou can get the filtered list of customers. \n\n````\nhttps://public-api.devmate.com/v2/customers?filter[filter1]=value1&filter[filter2]=value2...\n````\n\nThe following types of filtration are implemented:\n\n* **Exact**: only exact matches will be selected. For example, if `order_id=123` was requested, the response will contain the record for customers with order number 123 only, but not 1234 or others.\n* **Extended**: selects both the exact match and the entries, that contain specified string. For example, if `email=company.com` was requested, the response will contain entries with the following emails: `[email protected], [email protected], [email protected]`\n\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Filter\",\n \"h-1\": \"Description\",\n \"h-2\": \"Filtration Type\",\n \"h-3\": \"Example\",\n \"0-0\": \"`email`\",\n \"1-0\": \"`first_name`\",\n \"2-0\": \"`last_name`\",\n \"6-0\": \"`key`\",\n \"7-0\": \"`identifier`\",\n \"8-0\": \"`order_id`\",\n \"9-0\": \"`activation_id`\",\n \"10-0\": \"`invoice`\",\n \"0-1\": \"Customer's email\",\n \"1-1\": \"Customer's first name\",\n \"2-1\": \"Customer's last name\",\n \"6-1\": \"Activation number\",\n \"7-1\": \"Identifier of computer, which is connected to the `key`\",\n \"8-1\": \"DevMate order ID\",\n \"9-1\": \"Activation ID (available to customer in application)\",\n \"10-1\": \"Billing order ID\",\n \"0-2\": \"Extended\",\n \"1-2\": \"Extended\",\n \"2-2\": \"Extended\",\n \"7-2\": \"Extended\",\n \"10-2\": \"Extended\",\n \"6-2\": \"Exact\",\n \"8-2\": \"Exact\",\n \"9-2\": \"Exact\",\n \"0-3\": \"[email protected]\",\n \"1-3\": \"John\",\n \"2-3\": \"Doe\",\n \"6-3\": \"id1234567890123odr\",\n \"7-3\": \"ff:ff:ff:aa:aa:aa\",\n \"8-3\": \"123456\",\n \"9-3\": \"1509013782987\",\n \"10-3\": \"CORP150902-0339-893098\",\n \"3-0\": \"`company`\",\n \"4-0\": \"`phone`\",\n \"5-0\": \"`address`\",\n \"3-1\": \"Customer's company name\",\n \"4-1\": \"Customer's phone number\",\n \"5-1\": \"Customer's address\",\n \"3-3\": \"MacPaw\",\n \"4-3\": \"5554133113\",\n \"5-3\": \"Madison Ave. 11\",\n \"3-2\": \"Extended\",\n \"4-2\": \"Extended\",\n \"5-2\": \"Extended\"\n },\n \"cols\": 4,\n \"rows\": 11\n}\n[/block]\nThe example above shows the selection of customers by email and last name with the limit of 10 entries.\n\n#Response Parameters\n\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Key\",\n \"h-1\": \"Value Type\",\n \"h-2\": \"Description\",\n \"0-0\": \"`id`\",\n \"0-1\": \"Integer\",\n \"0-2\": \"Customer's ID\",\n \"1-0\": \"`email`\",\n \"1-1\": \"String\",\n \"1-2\": \"Customer's email\",\n \"2-0\": \"`first_name`\",\n \"2-1\": \"String\",\n \"2-2\": \"Customer's first name\",\n \"3-0\": \"`last_name`\",\n \"3-1\": \"String\",\n \"3-2\": \"Customer's last name\",\n \"7-0\": \"`note`\",\n \"7-1\": \"String\",\n \"7-2\": \"Notes about customer (can be added in DevMate Dashboard or with API request)\",\n \"8-0\": \"`date_added`\",\n \"8-1\": \"Integer\",\n \"8-2\": \"Date of adding customer\",\n \"9-0\": \"`licenses`\",\n \"9-1\": \"Array of objects\",\n \"9-2\": \"Info about licenses. Returned only if info about one customer requested (see description below).\",\n \"4-0\": \"`company`\",\n \"5-0\": \"`phone`\",\n \"6-0\": \"`address`\",\n \"4-1\": \"String\",\n \"5-1\": \"String\",\n \"6-1\": \"String\",\n \"4-2\": \"Customer's company name\",\n \"5-2\": \"Customer's phone number\",\n \"6-2\": \"Customer's address\"\n },\n \"cols\": 3,\n \"rows\": 10\n}\n[/block]\n**Licenses**\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Key\",\n \"h-1\": \"Value Type\",\n \"h-2\": \"Description\",\n \"0-0\": \"`license_type_name`\",\n \"0-1\": \"String\",\n \"0-2\": \"License type name\",\n \"1-0\": \"`license_type_id`\",\n \"1-1\": \"Integer\",\n \"1-2\": \"License type ID in DevMate\",\n \"2-0\": \"`invoice`\",\n \"2-1\": \"String\",\n \"2-2\": \"Order ID sent by billing system\",\n \"3-0\": \"`campaign`\",\n \"3-1\": \"String\",\n \"3-2\": \"Campaign for which the license was issued\",\n \"5-0\": \"`activations_used`\",\n \"5-1\": \"Integer\",\n \"5-2\": \"The number of activations used\",\n \"6-0\": \"`id`\",\n \"6-1\": \"Integer\",\n \"6-2\": \"The ID of the key in DevMate\",\n \"7-0\": \"`expiration_date`\",\n \"8-0\": \"`products`\",\n \"9-0\": \"`status`\",\n \"10-0\": \"`activations_total`\",\n \"11-0\": \"`activation_key`\",\n \"12-0\": \"`history`\",\n \"7-1\": \"Integer\",\n \"9-1\": \"Integer\",\n \"10-1\": \"Integer\",\n \"11-1\": \"String\",\n \"12-1\": \"Array of objects\",\n \"8-1\": \"Array of objects\",\n \"7-2\": \"UTC timestamp of the key validity. Applicable if the corresponding option was set in DevMate\",\n \"8-2\": \"Products for which the license is valid (see description below)\",\n \"9-2\": \"Activation key status:\\n1: never used\\n2: used (application is activated)\\n3: activation expired \\n4: blocked within DevMate Dashboard\\n5: refunded\",\n \"10-2\": \"The number of activations available for customer using the key\",\n \"11-2\": \"Activation key\",\n \"12-2\": \"Activation key changelog (see description below)\",\n \"4-0\": \"`date_created`\",\n \"4-1\": \"Integer\",\n \"4-2\": \"UTC timestamp of license issued\"\n },\n \"cols\": 3,\n \"rows\": 13\n}\n[/block]\n**Product**\n[block:parameters]\n{\n \"data\": {\n \"0-0\": \"`id`\",\n \"0-1\": \"Integer\",\n \"0-2\": \"Product ID in DevMate\",\n \"1-0\": \"`name`\",\n \"1-1\": \"String\",\n \"1-2\": \"Product name\",\n \"2-0\": \"`bundle_id`\",\n \"2-1\": \"String\",\n \"2-2\": \"Product bundle ID\",\n \"3-0\": \"`use_offline_license`\",\n \"3-1\": \"Boolean\",\n \"3-2\": \"Determines whether it is possible to generate offline licenses for the product\",\n \"h-0\": \"Key\",\n \"h-1\": \"Value Type\",\n \"h-2\": \"Description\"\n },\n \"cols\": 3,\n \"rows\": 4\n}\n[/block]\n**History**\n[block:parameters]\n{\n \"data\": {\n \"0-0\": \"`type`\",\n \"0-1\": \"Integer\",\n \"0-2\": \"Type of record:\\n2 – time of license created\",\n \"1-0\": \"`user_name`\",\n \"1-1\": \"String\",\n \"1-2\": \"DevMate user name, who made an action\",\n \"2-0\": \"`note`\",\n \"2-1\": \"String\",\n \"2-2\": \"Description of action or comment\",\n \"3-0\": \"`timestamp`\",\n \"3-1\": \"Integer\",\n \"3-2\": \"UNIX timestamp of time of the action\",\n \"h-0\": \"Key\",\n \"h-1\": \"Value Type\",\n \"h-2\": \"Description\"\n },\n \"cols\": 3,\n \"rows\": 4\n}\n[/block]","updates":[],"order":1,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"591f17b521d2ff0f00cf5a75","githubsync":"","user":"547cd6ac78fd57080023ca99","version":{"version":"1.0.1","version_clean":"1.0.1","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["591f17af21d2ff0f00cf5a40","591f17af21d2ff0f00cf5a41","591f17af21d2ff0f00cf5a42","591f17af21d2ff0f00cf5a43","591f17af21d2ff0f00cf5a44","591f17af21d2ff0f00cf5a45","591f17af21d2ff0f00cf5a46","591f17af21d2ff0f00cf5a47","591f17af21d2ff0f00cf5a48","60805d13afe7e7003acde2f9"],"_id":"591f17ae21d2ff0f00cf5a3f","createdAt":"2017-05-19T16:05:02.775Z","__v":2,"project":"547cd7662eaee50800ed1089","releaseDate":"2017-05-19T16:05:02.775Z"},"category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Public API","slug":"public-api","order":9,"from_sync":false,"reference":false,"_id":"591f17af21d2ff0f00cf5a48","__v":0,"project":"547cd7662eaee50800ed1089","createdAt":"2015-09-25T10:22:16.805Z","version":"591f17ae21d2ff0f00cf5a3f"},"parentDoc":null,"project":"547cd7662eaee50800ed1089","createdAt":"2015-09-25T10:26:37.050Z","__v":0}
getGet Customer(s) Info
Definition
{{ api_url }}{{ page_api_url }}
Parameters
Path Params
customer_id:
integer
Add this parameter to get the info on specific customer
Query Params
filter[email]:
string
Filter by customers' email. See [Filtration](#section-filtration) below.
filter[first_name]:
string
Filter by customers' first name. See [Filtration](#section-filtration) below.
filter[last_name]:
string
Filter by customers' last name. See [Filtration](#section-filtration) below.
filter[company]:
string
Filter by customers' company. See [Filtration](#section-filtration) below.
filter[phone]:
string
Filter by customers' phone number. See [Filtration](#section-filtration) below.
filter[address]:
string
Filter by customers' address. See [Filtration](#section-filtration) below.
filter[key]:
string
Filter by customers' activation key. See [Filtration](#section-filtration) below.
filter[identifier]:
string
Filter by customers' computer ID. See [Filtration](#section-filtration) below.
filter[order_id]:
string
Filter by customers' DevMate order ID. See [Filtration](#section-filtration) below.
filter[activation_id]:
string
Filter by customers' activation ID. See [Filtration](#section-filtration) below.
filter[invoice]:
string
Filter by billing order ID. See [Filtration](#section-filtration) below.
offset:
integer
Get selected customers starting from the number specified.
limit:
integer
Limits the number of customers within one server response.
with:
string
Get customers with licenses