Skip to main content
curl --request POST 'https://api.mayar.id/hl/v2/products/2529541f-dc98-4ca0-93bb-3c1d35a8dd07/close' \
--header 'Authorization: Bearer Paste-Your-API-Key-Here'
{
    "statusCode": 200,
    "messages": "success"
}
Endpoint:
https://api.mayar.id/hl/v2/products/{id}/{action}

Authorization

Authorization
string
required
Example:Authorization | Bearer Paste-Your-API-Key-Here

Path Parameters

id
string <uuid>
required
Unique product ID.
action
string
required
The status action to apply to the product. One of:
  • open
  • close
  • active
  • closed
  • unlisted
An unsupported value returns 400 with a message of the form <action>. allowed: active, closed, unlisted.

Response

Successful Response
statusCode
integer
Status code form API.
messages
string
Status message that describes the status code (success or failed).

Errors

400 Bad Request
object
Returned when the action is not supported: { "statusCode": 400, "messages": "<action>. allowed: active, closed, unlisted" }.
404 Not Found
object
Returned when the product does not exist: { "statusCode": 404, "messages": "Product not found" }.