Skip to main content

DELETE /api/v1/apps/:appUuid/promotion-codes/:promotionCodeUuid

Deletes an app promotion code (currently implemented as a placeholder plain-text response).

This endpoint documentation is generated from the current Fastify route implementation and should be treated as the implementation-level contract for this version of the API.

Source route file: src/api/routes/external/private/apiKey/app/promotionCodes/delete.ts

Request Method

DELETE

Base URL

https://api.userdocks.local:5000

Endpoint

/api/v1/apps/:appUuid/promotion-codes/:promotionCodeUuid

Path Variables

VariableTypeRequiredDescription
appUuidstringtruePath variable from route pattern.
promotionCodeUuidstringtruePath variable from route pattern.

Query Parameters

No query parameters.

HTTP Headers

VariableTypeRequiredDescription
x-api-keystringtrueAPI key value for the app.
x-client-idstringtrueMust match :appUuid path variable.
x-api-key-typestringtrueUse read for GET and write for POST/PUT/DELETE.
Content-TypestringfalseUse application/json for JSON request bodies.

Successful Response

Success status code(s): 200.

DELETE /apps/:appUuid/promotion-codes/:promotionCodeUuid

Error Responses

HTTP StatusExample Error
401{"errors":[{"validation":"error","code":"[E4010]","message":"Unauthorized Token or API key"}]}
401{"errors":[{"validation":"error","code":"[E4011]","message":"Unauthorized API key type"}]}
403{"errors":[{"validation":"error","code":"[E4030]","message":"App Is Disabled"}]}
400{"errors":[{"validation":"error","code":"[E4000]","message":"Bad Request / validation error"}]}
500{"errors":[{"validation":"error","code":"[E0000]","message":"Internal Server Error"}]}

Example

const url = `https://api.userdocks.local:5000/api/v1/apps/appUuid-value/promotion-codes/promotionCodeUuid-value`;

const response = await fetch(url, {
method: 'DELETE',
headers: {
'x-api-key': '<api-key>',
'x-client-id': 'appUuid-value',
'x-api-key-type': 'write',
},
});
const data = await response.text();
console.log(response.status, data);