Import

Manage Imports, which are collections of Invoices.

get
Show Import

https://api.clubcollect.com/api/v2/imports/:id
Fetch an Import’s details.
Request
Response
Path Parameters
id
required
string
Import ID, supplied by ClubCollect.
Query Parameters
api_key
required
string
Partner API Key.
200: OK
Import successfully retrieved.
{
"import_id": "a1f3216863ba5d5424dcbace46ab37be98d70c92",
"title": "Membership fees 2016/02",
"transmitted": true|false,
"transmitted_at": "2017-05-16T08:57:02+00:00",
"prepaid_amount_cents": 123,
"prepaid_amount_currency": "EUR|GBP|CHF",
"settled_amount_cents": 456,
"settled_amount_currency": "EUR|GBP|CHF",
"invoice_ids": [
"47417520982b90764d0067d529691934e6ec3a42",
"c0009400834121ded4cdd5a623da52f12c737262",
"43cf319011497b1b40d81e341a652b04866a2d0b"
]
}
404: Not Found
Could not find an Import with this ID.
{
"errors": "invalid_import_id"
}

post
Create Import

https://api.clubcollect.com/api/v2/imports
Create a new, empty Import.
Request
Response
Query Parameters
api_key
required
string
Partner API Key.
Body Parameters
title
optional
string
company_id
required
string
Company to which the Import should belong.
200: OK
{
"import_id": "a1f3216863ba5d5424dcbace46ab37be98d70c92",
"title": "Membership fees 2016/02",
"transmitted": false,
"transmitted_at": null,
"prepaid_amount_cents": 0,
"prepaid_amount_currency": "EUR",
"settled_amount_cents": 0,
"settled_amount_currency": "EUR",
"invoice_ids": [
]
}
422: Unprocessable Entity
{
"error": "invalid_company_id"
}

The following /imports/:id/transmit endpoint will be deprecated soon in favour of manually transmitting an Import via the ClubCollect User Interface. This gives treasurers the opportunity to configure settings correctly which is not possible via the API.

put
Transmit Import

https://api.clubcollect.com/api/v2/imports/:id/transmit
Instruct ClubCollect to transmit the Import, initiating the invoice collection process.
Request
Response
Path Parameters
id
required
string
Import ID
Query Parameters
api_key
required
string
Partner API Key
204: No Content
Batch successfully transmitted.
404: Not Found
{
"error": "invalid_import_id"
}
422: Unprocessable Entity
{
"error": "import_already_transmitted"
}

Ensure you have finished creating all Invoices for this Import before calling this method. It is not possible to change or add more Invoices to an Import after the Import has been transmitted.

delete
Delete Import

https://api.clubcollect.com/api/v2/imports/:id
Deletes an import and all the invoices that have been created for the import.
Request
Response
Path Parameters
id
required
string
Import ID
Query Parameters
api_key
required
string
Partner API Key
204: No Content
Batch successfully deleted.
404: Not Found
{
"error": "invalid_import_id"
}
422: Unprocessable Entity
{
"error": "import_already_transmitted"
}