{"_id":"56eb92af06e2c6190046dc8d","category":{"_id":"5715baa9810df00e00cc7837","project":"56e29a8dd3b68d0e00b48ffa","__v":0,"version":"56e29a8dd3b68d0e00b48ffd","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-04-19T04:57:13.380Z","from_sync":false,"order":6,"slug":"coverage","title":"Covers"},"project":"56e29a8dd3b68d0e00b48ffa","user":"56e62c36cfa58f0e00eafcfb","parentDoc":null,"__v":8,"editedParams":true,"githubsync":"","version":{"_id":"56e29a8dd3b68d0e00b48ffd","hasReference":true,"project":"56e29a8dd3b68d0e00b48ffa","__v":15,"hasDoc":true,"createdAt":"2016-03-11T10:14:37.460Z","releaseDate":"2016-03-11T10:14:37.460Z","categories":["56e29a8ed3b68d0e00b48ffe","56eb917a2e58011700afdfcc","56eb92252109011700f3ba5e","5704d4af849f721900f27835","57052a31473f900e004d5d54","5715222811537f19006aab2d","5715b57b810df00e00cc7832","5715baa9810df00e00cc7837","57180ed83a17770e009a7322","571810273a17770e009a7325","579b22d3f4ad7b190094b60e","584538ecba4f1c0f0096925e","586bb88e5602870f00ae7177","5a70407fb0a01400369583c5","5ace359e40606a0003eac1de"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"editedParams2":true,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-03-18T05:31:27.921Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"<?php\n// Example assumes Composer is in use with GuzzleHttp as the API library.\nrequire_once(\"vendor/autoload.php\");\nuse GuzzleHttp\\Client;\n\n// Production environment endpoint\n// $api_base_uri = 'https://api.single-invoice.co/v2.0';\n\n// Sandbox environment endpoint\n$api_base_uri = 'https://api-demo.single-invoice.co/v2.0';\n\n// Create a client and provide a base URL\n$client = new Client([ \n\t'timeout' \t=> 80.0,\n\t'verify'\t=> true,\n\t'debug'\t\t=> true\n]);\n\ntry\n{\n\t$apikey = \"7Rtcnaj5adqzGFt6AINktPN8Ywjv7m2uUp5zJ9wiubaP7NuAunHT9j6e5SHqPV1g\";\n\t\n\t$response = $client->request('GET', $api_base_uri.\"/coverage\", [\n\t\t'query' => [ 'page' => 0 ],  // handle page number as required\n\t\t'headers' => [ 'apikey' => $apikey ],\n\t]);\n\n\t// Check the status code returned by the call\n\t$statusCode = $response->getStatusCode();\n\n\t// Get the data\n\t$data = json_decode($response->getBody(), true);\n}\ncatch (GuzzleHttp\\Exception\\ClientException $e) {\n    $response = $e->getResponse();\n    $responseBodyAsString = $response->getBody()->getContents();\n\n\t// handle $responseBodyAsString;\n}","language":"php"}]},"method":"get","results":{"codes":[{"name":"","code":"[\n    {\n        \"id\": \"cb5d8b38-6abb-79dc-da78-b222fdc112c9\",\n        \"status\": \"Pending\",\n        \"coverage\": {\n            \"amount\": 5.37,\n            \"currency\": \"gbp\"\n        },\n        \"sellerId\": \"d4c4a3ab-c6e3-0f46-f9c7-ce28456c6d31\",\n        \"buyerId\": \"6ca0192c-fe45-d083-2421-d429f1fe17f0\",\n        \"invoice\": {\n            \"Amount\": 3360,\n            \"Currency\": \"gbp\",\n            \"DueAt\": \"2016-10-01T00:00:00Z\",\n            \"IssuedAt\": \"2016-09-01T00:00:00Z\",\n            \"Number\": null\n        }\n    },\n    {\n        \"id\": \"5a13b9c5-86aa-8f5c-61bc-ef5b9ed2f35b\",\n        \"status\": \"Pending\",\n        \"coverage\": {\n            \"amount\": 38.7,\n            \"currency\": \"gbp\"\n        },\n        \"sellerId\": \"86ca88bf-8364-cf72-6798-10babd267fb9\",\n        \"buyerId\": \"51650a5c-424f-0fe5-8153-f6663905bbae\",\n        \"invoice\": {\n            \"Amount\": 4500,\n            \"Currency\": \"gbp\",\n            \"DueAt\": \"2016-10-01T00:00:00Z\",\n            \"IssuedAt\": \"2016-09-01T00:00:00Z\",\n            \"Number\": null\n        }\n    }\n]","language":"json","status":200},{"name":"","code":"{\n\t\"message\" : \"Bad authentication information\",\n  \"docUrl\": \"http://docs.armadill.io/docs/errors#section-bad-authentication-information\"\n}","language":"json","status":401},{"code":"{\n\t\"message\" : \"Expired date stamp\",\n  \"docUrl\": \"https://armadill.io/docs/authentication\"\n}","language":"json","status":408}]},"settings":"","auth":"required","params":[{"_id":"57052879849f721900f27989","ref":"","in":"query","required":false,"desc":"The [status](coverage-by-id#section-coverage-status) to filter against. Values are \"pending\", \"active\", \"cancelled\", \"expired\" and \"rejected\"","default":"","type":"string","name":"status"},{"_id":"57151a0eb54f5c19007686d7","ref":"","in":"query","required":false,"desc":"An ISO 8601 datestamp indicating the start date to filter against","default":"","type":"datetime","name":"from"},{"_id":"57151a0eb54f5c19007686d6","ref":"","in":"query","required":false,"desc":"An ISO 8601 datestamp indicating the end date to filter against","default":"","type":"datetime","name":"to"},{"_id":"57056da619393c0e0086c370","ref":"","in":"query","required":false,"desc":"The [page number](pagination) to return, if there are more than 50 results","default":"0","type":"int","name":"page"},{"_id":"579e4ef14c4ab40e00b494c6","ref":"","in":"header","required":true,"desc":"Your Coverage API Key, in the HTTP request headers.","default":"","type":"string","name":"apikey"}],"url":"/coverage?status=:status&from=:from&to=:to&page=:page"},"isReference":true,"order":2,"body":"This method allows you to retrieve a list of all the coverages that are associated with your account. \n\nThis will include a complete list of every coverage, including quotes that have not be activated. \n\nThe list can be filtered based on the following parameters\n\n* Page: Current page to use for pagination of results. Page numbers start at 0. \n\nThe following filters are not yet implemented but will be available in a future update: \n\n* Status: filter based on a specific status (e.g., \"pending\" will list all coverages that have not yet been activated or rejected) \n* From: filter coverages starting from this date, supplied as an ISO 8601 timestamp\n* To: filter coverages up to this date, supplied as an ISO 8601 timestamp\n\n\nUse [the By ID API](doc:transactor-by-id) to retrieve information on the buyer and seller.","excerpt":"Returns all covers for the current customer.","slug":"coverages","type":"endpoint","title":"Get All Covers"}

getGet All Covers

Returns all covers for the current customer.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

status:
string
The [status](coverage-by-id#section-coverage-status) to filter against. Values are "pending", "active", "cancelled", "expired" and "rejected"
from:
datetime
An ISO 8601 datestamp indicating the start date to filter against
to:
datetime
An ISO 8601 datestamp indicating the end date to filter against
page:
integer0
The [page number](pagination) to return, if there are more than 50 results

Headers

apikey:
required
string
Your Coverage API Key, in the HTTP request headers.

Examples


Result Format


Documentation

This method allows you to retrieve a list of all the coverages that are associated with your account. This will include a complete list of every coverage, including quotes that have not be activated. The list can be filtered based on the following parameters * Page: Current page to use for pagination of results. Page numbers start at 0. The following filters are not yet implemented but will be available in a future update: * Status: filter based on a specific status (e.g., "pending" will list all coverages that have not yet been activated or rejected) * From: filter coverages starting from this date, supplied as an ISO 8601 timestamp * To: filter coverages up to this date, supplied as an ISO 8601 timestamp Use [the By ID API](doc:transactor-by-id) to retrieve information on the buyer and seller.