Skip to content

Distribution

Distribution to the supported distribution channels can be controlled by the distribution endpoint.

Enable/Disable distribution for a product

The following request enables or disabled the distribution for a product for all channels. This request won't overwrite the defaults set for a specific channel:

POST https://api.openpublishing.com/rpc/v2/products/<product_id>/distribution

URL:

  • product_id: The open publishing product id

Parameter:

  • enabled: Values true or false. Enables or disables the distribtion for all distribution channels.

Return value:

{
    "enabled": True
}

Enable/Disable distribution for a single channel

POST https://api.openpublishing.com/rpc/v2/products/<product_id>/distribution/<channel>

URL:

  • product_id: The open publishing product id
  • channel: Channel name, e.g. amazon or libri. Ask OP support for a complete list.

Parameter:

  • enabled: Values true or false. Enables or disables the distribtion for all distribution channels.

Return value:

{
    "enabled": True
}

Retrieve current distribution config

GET https://api.openpublishing.com/rpc/v2/products/<product_id>/distribution/<channel>
GET https://api.openpublishing.com/rpc/v2/products/<product_id>/distribution

URL:

  • product_id, channel: as above.

Return value:

{
    "enabled": True
}