Warning: Below our records have newlines for legibility. When submitting a batch file you must only use newlines to separate records.
Farmlands External Asset Batch
Loads Farmlands Card data into Centrapay as external assets.
| Type Name | File Format | Record Type |
|---|---|---|
| farmlands-external-asset | JSONL | Account |
Account Model
Exported Farmlands Account used for importing and updating of a Centrapay Asset.
Attributes
availableBalancebignumberCurrent spendable balance of Centrapay Asset in cents. When not specified, defaults to 0.
Contact Model
Exported Farmlands Contact and Card information used for authentication, correspondence and payment.
Attributes
cardsarrayCard list used for payment for the authenticated subject. When empty all Cards are removed.
Card Model
Exported Farmlands Credit Card information used for importing and updating of a Patron Code.
Attributes
Example JSONL File
A complete batch example with all batch types included. For more legible examples please refer to Example Models.
{"externalId":"9b2ec6d1-c83b-496a-8e52-2989f23d9076","accountNumber":"012345678","availableBalance":"1000","contacts":[]}{"externalId":"d0d7e14d-4ce5-4f42-8a4c-d604a9609f66","accountNumber":"012345678","availableBalance":"1000"}{"externalId":"69d64d80-f9bd-4057-bc5b-1c55685d995b","accountNumber":"012345678","contacts":[{"externalId":"6e496c2a-1dae-4036-847d-c53bf6c6d410","name":"Road Runner","mobile":"+64221105598","email":"road@runner.net","primary":true,"cards":[{"externalId":"9b2ec6d1-c83b-496a-8e52-2989f23d9076","barcode":"976238759","number":"1464549137071848","status":"active","expiry":"2022-10-01T22:32:56.631Z"},{"externalId":"74e4f94c-8316-42e7-9aa1-eb1539528894","barcode":"957813964","number":"6583418750394768","status":"inactive","expiry":"2022-08-01T22:32:56.631Z"}]}]}{"externalId":"b5fde0e0-357c-4fda-a90f-fd857f2be999","accountNumber":"830578479","availableBalance":"12000","contacts":[{"externalId":"6e496c2a-1dae-4036-847d-c53bf6c6d410","name":"Road Runner","mobile":"+64221102598","email":"road@runner.net","primary":true,"cards":[{"externalId":"65e701c3-6973-4322-8fa6-4560a489417f","barcode":"458028560","number":"2072080986444582","status":"active","expiry":"2023-06-01T22:32:56.631Z"},{"externalId":"69d64d80-f9bd-4057-bc5b-1c55685d995b","barcode":"635570865","number":"6982374819924328","status":"inactive","farmlandsStatus":"Suspended by customer","expiry":"2022-04-01T22:32:56.631Z"}]},{"externalId":"6e4813e6-7a18-47ea-b92e-add36c8815ca","name":"Yosemite Sam","mobile":"+64220002598","email":"yosemite@runner.net","primary":false,"cards":[{"externalId":"74e4f94c-8316-42e7-9aa1-eb1539528894","barcode":"137628567","number":"4354969251656341","status":"active","expiry":"2022-04-01T22:32:56.631Z"}]},{"externalId":"82bdb041-ea79-448c-816f-77af8b6750b2","name":"Wile E. Coyote","mobile":"+64221102598","email":"while@e-cyote.net","primary":false,"cards":[{"externalId":"62904b86-b4cc-45a9-b3c9-287a00ae9ef5","barcode":"722798445","number":"5700810476667788","status":"active","expiry":"2022-04-01T22:32:56.631Z"}]}]}Example Models
Centrapay matches previously created resources using externalId and records get created or updated based on these IDs. In some cases, fields may be omitted to only update some fields.
An example of a Centrapay Asset complete with availableBalance, contacts and cards.
{ "externalId": "b5fde0e0-357c-4fda-a90f-fd857f2be999", "accountNumber": "830578479", "availableBalance": "12000", "contacts": [ { "externalId": "6e496c2a-1dae-4036-847d-c53bf6c6d410", "name": "Road Runner", "mobile": "+64221102598", "email": "road@runner.net", "primary": true, "cards": [ { "externalId": "65e701c3-6973-4322-8fa6-4560a489417f", "barcode": "458028560", "number": "1464549137071848", "status": "active", "expiry": "2023-06-01T22:32:56.631Z" }, { "externalId": "69d64d80-f9bd-4057-bc5b-1c55685d995b", "barcode": "635570865", "number": "1370718414645498", "status": "inactive", "farmlandsStatus": "Suspended by customer", "expiry": "2022-04-01T22:32:56.631Z" } ] }, { "externalId": "6e4813e6-7a18-47ea-b92e-add36c8815ca", "name": "Yosemite Sam", "mobile": "+64220002598", "email": "yosemite@runner.net", "primary": false, "cards": [ { "externalId": "74e4f94c-8316-42e7-9aa1-eb1539528894", "barcode": "137628567", "number": "1364549870718414", "status": "active", "expiry": "2022-04-01T22:32:56.631Z" } ] }, { "externalId": "82bdb041-ea79-448c-816f-77af8b6750b2", "name": "Wile E. Coyote", "mobile": "+64221102598", "email": "while@e-cyote.net", "primary": false, "cards": [ { "externalId": "62904b86-b4cc-45a9-b3c9-287a00ae9ef5", "barcode": "722798445", "number": "4987071841413645", "status": "active", "expiry": "2022-04-01T22:32:56.631Z" } ] } ]}Update the availableBalance on an account and remove all contacts associated with it. Note, this renders the availableBalance un-spendable.
{ "externalId": "9b2ec6d1-c83b-496a-8e52-2989f23d9076", "accountNumber": "012345678", "availableBalance": "1000", "contacts": []}Update the availableBalance on an account.
{ "externalId": "d0d7e14d-4ce5-4f42-8a4c-d604a9609f66", "accountNumber": "012345678", "availableBalance": "1000"}Update the contact list for an account. Use this where you want to exclude availableBalance.
{ "externalId": "69d64d80-f9bd-4057-bc5b-1c55685d995b", "accountNumber": "012345678", "contacts": [ { "externalId": "6e496c2a-1dae-4036-847d-c53bf6c6d410", "name": "Road Runner", "mobile": "+64221105598", "email": "road@runner.net", "primary": true, "cards": [ { "externalId": "9b2ec6d1-c83b-496a-8e52-2989f23d9076", "barcode": "976238759", "number": "0718414498713645", "status": "active", "expiry": "2022-10-01T22:32:56.631Z" }, { "externalId": "74e4f94c-8316-42e7-9aa1-eb1539528894", "barcode": "957813964", "number": "0714498471364518", "status": "inactive", "expiry": "2022-08-01T22:32:56.631Z" } ] } ]}