Create voucher
POST
/shops/{id}/vouchers
const url = 'https://example.com/shops/example/vouchers';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"batch_id":"example","code":"example","link":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/shops/example/vouchers \ --header 'Content-Type: application/json' \ --data '{ "batch_id": "example", "code": "example", "link": "example" }'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string
Request Body required
Section titled “Request Body required ”Responses
Section titled “ Responses ” Media type application/json
object
Example generated
{ "id": "example", "batch_id": "example", "code": "example", "link": "example", "created_at": "example", "updated_at": "example", "plucked_at": "example"}