REST API: go_cardless_mandate rejects new 28-character GoCardless mandate IDs

Hello,

In May, the web application’s Import mandate was updated for the new 28-character GoCardless mandate IDs (topic “GoCardless mandate id length changed”, Support). The REST API still has the old limit of 15 characters for go_cardless_mandate.

We are using the REST API (beta) to create clients and link their GoCardless mandates. New GoCardless mandate IDs are now 28 characters long (for example MD01XXXXXXXXXXXXXXXXXXXXXXXX). The older IDs were 14 characters, for example MD01XXXXXXXXXX.

When we create a client with a 28-character mandate:

POST https://api-beta.quickfile.co.uk/clients
{“company_name”: “Test client”, “go_cardless_mandate”: “MD01XXXXXXXXXXXXXXXXXXXXXXXX”}

the API refuses it:

400 {“error”:{“type”:“request_error”,“code”:“validation”,
“message”:“The gocardless mandate must be between 6 and 15 characters long.”,
“param”:“go_cardless_mandate”}}

The API specification gives the same limit (maxLength 15) for go_cardless_mandate in ClientCreateRequest and ClientUpdateRequest.

But the same 28-character mandate is accepted in the web application (client → Direct Debit → Import mandate). After that, GET /clients/{id} returns all 28 characters in direct_debit_mandate_id. So QuickFile stores the new IDs, and only the REST API validation refuses them.

Please can you increase the limit for go_cardless_mandate in create and update client to at least 28 characters? Until then, we must import each new mandate by hand.

Thank you.

Hi @big_mark

Apologies for any inconvenience cause here. I’ve asked our development team to look into this and will update you when this has been resolved.