GoMake

Gomake API

POST

Create Product SKU

Creates a new Product SKU

/api/products/sku/create

Request Body

codestring(required) - SKU Code (Must be unique)
namestring(optional) - SKU Name
printerIdinteger(optional) - Printer ID (int)
printerBinstring(optional) - Printer Bin
productionFloorJobColorstring(optional) - Color for production floor view
{
  "code": "SKU-001",
  "name": "Test SKU 1"
}

Responses

200Product SKU created successfully
{
  "data": "49428e77-4ad2-49f6-9993-550e58bb1fe9",
  "success": true
}

Returns the ID of the created SKU

400Bad request - Invalid input data
{
  "error": {
    "data": {
      "title": "One or more validation errors occurred.",
      "errors": {
        "$.printerId": [
          "The JSON value could not be converted to System.Int32."
        ]
      },
      "status": 400
    },
    "message": "Request failed with status code 400",
    "statusCode": 400
  },
  "success": false
}
500Internal Server Error - e.g. Duplicate Code
{
  "error": {
    "data": {
      "status": false,
      "message": "internal_server_error",
      "statusCode": 500,
      "errorParams": null,
      "ErrorMessage": "Internal Server Error from the custom middleware : A write operation resulted in an error. WriteError: { Category : \"DuplicateKey\", ... }"
    },
    "message": "internal_server_error",
    "statusCode": 500
  },
  "success": false
}

Example Request

curl -X POST \
  https://api.gomake.net/api/products/sku/create \
  -H "Content-Type: application/json" \
  -H "X-Client-Id: your-client-id-here" \
  -H "X-Client-Secret: your-client-secret-here" \
  -d '{
  "code": "SKU-001",
  "name": "Test SKU 1"
}'

Note: Replace your-client-id-here and your-client-secret-here with your actual credentials. See the Authentication page for more details.