homemade food app
  1. Merchant admin
homemade food app
  • APIs v1
    • Auth
      • Register: submit account data
        POST
      • Register: resend confirmation email
        POST
      • Register: submit email-confirmation code
        POST
      • Login by password or 3rd-party providers
        POST
      • Reset passwd: submit email
        POST
      • Reset passwd: submit new password
        PUT
    • Admin (role-based)
      • Merchant admin
        • Get products list
          GET
        • Create product (merchant-specific or global)
          POST
        • Update product
          PATCH
        • Delete product
          DELETE
        • Get discount events list
          GET
        • Create discount event for product(s)
          POST
        • Update discount event for product(s)
          PATCH
        • Delete discount event for product(s)
          DELETE
        • Create merchant
          POST
        • Find orders by merchant
          GET
        • Update order
          PATCH
        • Update order's delivery status
          PUT
      • Get users list
        GET
      • Get user by ID
        GET
      • Create user
        POST
      • Get merchants list
        GET
    • User (private)
      • Get current account data
        GET
      • Exchange new tokens
        GET
      • Request to delete current account
        DELETE
    • Public
      • Find merchants
        GET
      • Find products by merchant
        GET
      • Get merchant by ID
        GET
  1. Merchant admin

Create product (merchant-specific or global)

Designing
POST
https://mock.apidog.com/m1/740441-0-default/products
Last modified:2025-01-07 06:32:07

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Header Params

Body Params application/json

Example
{
    "id": 0,
    "name": "string",
    "sku": "HgB0EgAI3s",
    "merchantId": 0,
    "price": 0,
    "discountId": 0,
    "createdAt": 0,
    "disabledAt": 0,
    "categoryId": 0,
    "quantity": 0
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://mock.apidog.com/m1/740441-0-default/products' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "id": 0,
    "name": "string",
    "sku": "HgB0EgAI3s",
    "merchantId": 0,
    "price": 0,
    "discountId": 0,
    "createdAt": 0,
    "disabledAt": 0,
    "categoryId": 0,
    "quantity": 0
}'

Responses

🟢201OK
application/json
Body

Example
{
    "data": {
        "id": 0,
        "name": "string",
        "sku": "HgB0EgAI3s",
        "merchantId": 0,
        "price": 0,
        "discountId": 0,
        "createdAt": 0,
        "disabledAt": 0,
        "categoryId": 0,
        "quantity": 0
    },
    "error": null,
    "links": null,
    "meta": null
}
🟠400Invalid request body
🟠401Unauthorized
Modified at 2025-01-07 06:32:07
Previous
Get products list
Next
Update product
Built with