Product catalog

Build a product catalog to use across transfers and payment links.

Use the product API to create a product catalog for transfers and payment links. For each product, you can specify an image, title, description, and base price. You can also set additional option groups like size and color, each with their own images and additional price modifiers.

For example, a cafe has a product catalog that contains each of the drinks on their menu. Each drink product has an option group set up for alternative milk choices which adds a price modifier to the overall cost.

Create a product

To create a new product for the catalog, pass the accountID and specify a title and base price. Additionally, you can specify a description, an image, and option groups. The example below creates a lunch special with an option group that has price modifications for alternative milks.

You can upload and store images with Moov.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
curl -X POST "https://api.moov.io/accounts/{accountID}/products" \
  -H "Authorization: Bearer {token}" \
  --data '{
    "basePrice": {
      "currency": "USD",
      "valueDecimal": "14.95"
    },
    "title": "Monday lunch special 1",
    "description": "Sandwich, chips, latte",
    "images": [
      {
        "imageID": "bbdcb050-2e05-43cb-812a-e1296cd0c01a"
      }
    ],
    "optionGroups": [
      {
        "description": "Alternative milk options",
        "name": "Milk options",
        "options": [
          {
            "description": "Fancy brand oat milk",
            "images": [
              {
                "imageID": "bbdcb050-2e05-43cb-812a-e1296cd0c01a"
              }
            ],
            "name": "Oat milk",
            "priceModifier": {
              "currency": "USD",
              "valueDecimal": "1.00"
            }
          },
          {
            "description": "Fancy brand almond milk",
            "images": [
              {
                "imageID": "bbdcb050-2e05-43cb-812a-e1296cd0c01b"
              }
            ],
            "name": "Almond milk",
            "priceModifier": {
              "currency": "USD",
              "valueDecimal": "1.00"
            }
          }
        ]
      }
    ]
  }'\

If you want to use a product you've created, you'll need to use the product API to retrieve product data and map it to lineItems when creating transfers and payment links. You can, however, create freeform line items when initiating a transfer or payment link.

Manage products

Once a product catalog has been created, you can retrieve, update, and disable products.

List products

You can list all active products, or retrieve a single active or disabled product.

This endpoint will only return active products.

1
2
curl -X GET "https://api.moov.io/accounts/{accountID}/products" \
  -H "Authorization: Bearer {token}" \

This endpoint will retrieve an active or disabled product.

1
2
curl -X GET "https://api.moov.io/accounts/{accountID}/products/{productID}" \
  -H "Authorization: Bearer {token}" \

Update a product

Every part of a product and its options can be updated. Updating a product initiates a complete replacement of the product model, so while only the title and base price are required, any omitted fields will be removed from the model if not included in the update request.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
curl -X PUT "https://api.moov.io/accounts/{accountID}/products/{productID}" \
  -H "Authorization: Bearer {token}" \
  --data '{
    "basePrice": {
      "currency": "USD",
      "valueDecimal": "15.05"
    },
    "title": "Monday lunch special 1",
    "description": "Sandwich, chips, latte",
    "images": [
      {
        "imageID": "bbdcb050-2e05-43cb-812a-e1296cd0c01a"
      }
    ],
    "optionGroups": [
      {
        "description": "Alternative milk options",
        "name": "Milk options",
        "options": [
          {
            "description": "Fancy brand soy milk",
            "images": [
              {
                "imageID": "bbdcb050-2e05-43cb-812a-e1296cd0c01a"
              }
            ],
            "name": "Oat milk",
            "priceModifier": {
              "currency": "USD",
              "valueDecimal": "1.05"
            }
          },
          {
            "description": "Fancy brand coffee milk",
            "images": [
              {
                "imageID": "bbdcb050-2e05-43cb-812a-e1296cd0c01b"
              }
            ],
            "name": "Almond milk",
            "priceModifier": {
              "currency": "USD",
              "valueDecimal": "1.05"
            }
          }
        ]
      }
    ]
  }'\

Disable a product

A disabled product remains in the system for historical and reporting purposes. To disable a product, pass the accountID and productID.

1
2
curl -X DELETE "https://api.moov.io/accounts/{accountID}/products/{productID}" \
  -H "Authorization: Bearer {token}" \

Upload and store images

Use the images API to upload a PNG, JPG, or WebP image. You can supply alt-text through the metadata field. Duplicate images and images larger than 16MB will be rejected.

When you upload an image, you'll receive a imageID, which can be used to point to the image when you create or update a product.

1
2
3
4
5
6
7
8
curl -X POST "https://api.moov.io/accounts/{accountID}/images" \
  -H "Authorization: Bearer {token}" \
  --data '{
    "image": "00010101011111000101010110",
    "metadata": {
      "altText": "Blue oat milk carton by Fancy Brand"
    }
  }'\

View the images guide for more information.

Summary Beta