Product V2

Creates an item in your catalog keyed by your own id. Sending an ID that already exists fails with PRODUCT_ALREADY_EXISTS — use Update an item to change the catalog record. Items are also created automatically when a document references an unknown item id.

post/v2/product

Request

  • Base URL
    https://app.getswipe.in/api/partner
  • URL
    https://app.getswipe.in/api/partner/v2/product
  • Auth
    HTTP bearer

Query parameters

idstring required

Unique id for each item

namestring required

Name of the Product

quantitynumber required

Opening Quantity

unit_pricenumber required

Price per item without Tax

tax_ratenumber

Tax percentage for each item

price_with_taxnumber required

Price per item with Tax

purchase_price_with_taxnumber

Purchase Price per item with Tax

descriptionstring

Item Description

hsn_codestring

HSN Code

item_typestring required

Product or Service enum

unitstring

Item quantity unit

cess_ratenumber

Cess Percent of the Item

cess_amountnumber

Cess Amount of the Item

barcodestring

Barcode

categorystring

Category

alternative_unitsstring

JSON string of alternative units

custom_columnsstring

JSON string of custom fields

preferencesstring

JSON string of product preferences

Request body multipart/form-data

product_imagesstring[]

Product images (multiple files supported)

Response

Success

successboolean

Success flag

messagestring

Response message

error_codestring

Error Code

errorsobject

Errors

Example response

{
  "success": true,
  "message": "Message",
  "data": {
    "id": "ITEM123",
    "name": "Item Name",
    "quantity": 1,
    "unit_price": 100,
    "tax_rate": 18,
    "price_with_tax": 118,
    "purchase_price_with_tax": 118,
    "description": "Item Description",
    "hsn_code": "1234",
    "item_type": "Product",
    "unit": "kg",
    "barcode": "2273546838467",
    "category": "Electronics",
    "alternative_units": [
      {
        "alternative_unit": "g",
        "conversion_rate": 1000
      }
    ],
    "custom_columns": [
      {
        "label": "Custom Label",
        "value": "Custom Value"
      }
    ],
    "preferences": {
      "discount_percent": 10
    },
    "visibility": 1
  }
}

Changes

    • breaking

      added the new required query request parameter id

    • breaking

      added the new required query request parameter item_type

    • breaking

      added the new required query request parameter name

    • breaking

      added the new required query request parameter price_with_tax

    • breaking

      added the new required query request parameter quantity

    • breaking

      added the new required query request parameter unit_price

    • breaking

      removed the media type application/json from the request body

    • breaking

      the / response's property type changed from object to no type for status

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • info

      api operation id v2_post_product removed and replaced with post_product

    • info

      added the new optional query request parameter alternative_units

    • info

      added the new optional query request parameter barcode

    • info

      added the new optional query request parameter category

    • info

      added the new optional query request parameter cess_amount

    • info

      added the new optional query request parameter cess_rate

    • info

      added the new optional query request parameter custom_columns

    • info

      added the new optional query request parameter description

    • info

      added the new optional query request parameter hsn_code

    • info

      added the new optional query request parameter preferences

    • info

      added the new optional query request parameter purchase_price_with_tax

    • info

      added the new optional query request parameter tax_rate

    • info

      added the new optional query request parameter unit

    • info

      request body became optional

    • info

      added the optional property / to the response with the status