Skip to content

Latest commit

 

History

History
45 lines (33 loc) · 845 Bytes

File metadata and controls

45 lines (33 loc) · 845 Bytes

Equals

Get all digital products

In the example below, we will make a request to get all digital products from the Moltin catalog.

{% tabs %} {% tab title="cURL" %}

curl -X GET https://api.moltin.com/v2/products?filter=eq(commodity_type, digital) \
     -H "Authorization: Bearer XXXX"

{% endtab %}

{% tab title="JavaScript SDK" %}

const MoltinGateway = require('@moltin/sdk').gateway

const Moltin = MoltinGateway({
  client_id: 'X'
})

Moltin.Products.Filter({ eq: { commodity_type: 'digital' } })
  .All()
  .then(products => {
    // Do something
  })

{% endtab %}

{% tab title="Swift SDK" %}

let moltin = Moltin(withClientID: "<your client ID>")

moltin.product.filter(operator: .eq, key: "commodity_type", value: "digital").all {
  // Do something
}

{% endtab %} {% endtabs %}