Ooyala eCommerce Adapter API
version v3
https://player.ooyala.com/commerce/v3
Overview
Description
The eCommerce Adapter API is the bridge between the eCommerce API that is the payment API for the Revenue Builder project and the product catalog managment.
Accounts
Creates a new account within the custom billing vendor. This fails if the end user already has an account.
Creates a new account.
post /{pCode}/accounts
Creates a new account.
Each request must contain the headers necessary for basic authentication.
URI Parameters
- pCode: required (string)
 
Body
Type: application/json
Schema:
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "account": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "address": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "city": {
              "type": "string"
            },
            "state": {
              "type": "string"
            },
            "postal_code": {
              "type": "string"
            },
            "country": {
              "type": "string"
            }
          }
        }
      },
       "required": [
        "id",
        "email",
        "name"
      ]
    }
  },
  "required": [
    "account"
  ]
}
Example:
{
  "account": {
    "id": "example 27",
    "name": "example",
    "email": "example@test.com",
    "address": {
      "id": "4d76a893543h4662754662c281147f8af3995",
      "name": "test example",
      "address": [
        "addrs1",
        "addrs2",
        "addrs3"
      ],
      "city": "example",
      "state": "example",
      "postal_code": "75024",
      "country": "US"
    }
  }
}
HTTP status code 200
Success - Everything is working fine.
Body
Type: application/json
Schema:
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "account": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "address": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "address": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "city": {
              "type": "string"
            },
            "state": {
              "type": "string"
            },
            "postal_code": {
              "type": "string"
            },
            "country": {
              "type": "string"
            }
          }
        }
      },
       "required": [
        "id",
        "email",
        "name"
      ]
    }
  },
  "required": [
    "account"
  ]
}
Example:
{
  "account": {
    "id": "example 27",
    "name": "example",
    "email": "example@test.com",
    "address": {
      "id": "4d76a893543h4662754662c281147f8af3995",
      "name": "test example",
      "address": [
        "addrs1",
        "addrs2",
        "addrs3"
      ],
      "city": "example",
      "state": "example",
      "postal_code": "75024",
      "country": "US"
    }
  }
}
HTTP status code 400
Bad Request - Some of the parameters are missing, invalid, or malformed.
Body
Type: application/json
Example:
{"status": "error", "cause": "Request is missing required query parameter 'param name'"}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid API key."}
HTTP status code 403
Forbidden - The user does not have sufficient privileges to query the information for the specified provider.
Body
Type: application/json
Example:
{"status": "error", "cause": "The specified authentication is not authorized to access this resource."}
HTTP status code 500
Server Error - Something is wrong with the API and it might be intermittently unavailable.
Body
Type: application/json
Example:
{"status":"error","cause":"There was an unexpected error. If problems persist, please contact the application owner."}
Secured by bv-auth
Headers
- 
x-bv-password: (string)
Billing Vendor Password
 - 
x-bv-user: (string)
Billing Vendor User Account
 
Retrieves the specified account.
Returns the specified account.
get /{pCode}/accounts/{accountID}
Returns the specified account.
Each request must contain the headers necessary for basic authentication.
URI Parameters
- pCode: required (string)
 - accountID: required (string)
 
HTTP status code 200
Success - Everything is working fine.
Body
Type: application/json
Schema:
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "accounts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "address": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "address": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}
Example:
{
  "accounts":[
    {
      "id":"example-1",
      "name":"example",
      "email":"example@test.com",
      "address":{
        "id":"7ae9ed86100b7b6c8cefc4ab59d736139e03925e",
        "address":
        ["","",""]
      }
    }
  ]
}
HTTP status code 400
Bad Request - Some of the parameters are missing, invalid, or malformed.
Body
Type: application/json
Example:
{"status": "error", "cause": "Request is missing required query parameter 'param name'"}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid API key."}
HTTP status code 403
Forbidden - The user does not have sufficient privileges to query the information for the specified provider.
Body
Type: application/json
Example:
{"status": "error", "cause": "The specified authentication is not authorized to access this resource."}
HTTP status code 500
Server Error - Something is wrong with the API and it might be intermittently unavailable.
Body
Type: application/json
Example:
{"status":"error","cause":"There was an unexpected error. If problems persist, please contact the application owner."}
Secured by bv-auth
Headers
- 
x-bv-password: (string)
Billing Vendor Password
 - 
x-bv-user: (string)
Billing Vendor User Account
 
Onetime Changes
Initiates a transaction for a Pay Per View (PPV) purchase. It accepts the transaction details as input and returns session information. Prior to using this endpoint, you must first create an account and a payment method. NOTE: "content" is Ooyala's entitlement scheme. You must store it for reference for deferred charges. There must be a way for the eCommerce team to retrieve it.
Purchases PPV offers and credits.
Returns a list of the PPV purchases for the account. Purchases that contain multiple products are supported.
post /{pCode}/accounts/{accountID}/onetime-charges
Purchases PPV offers and credits.
Each request must contain the headers necessary for basic authentication.
URI Parameters
- pCode: required (string)
 - accountID: required (string)
 
Body
Type: application/json
Schema:
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "purchase": {
      "type": "object",
      "properties": {
        "payment_method": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "payment_method_type": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "payment_method_type"
          ]
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "product": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "integer"
                  }
                },
                "required": [
                  "id",
                  "amount"
                ]
              },
              "content": {
                "type": "object",
                "properties": {
                  "labels": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "content_id": {
                          "type": "string"
                        },
                        "external_product_id": {
                          "type": "string"
                        },
                        "publishing_rule_id": {
                          "type": "null"
                        },
                        "start_time": {
                          "type": "string"
                        },
                        "updated_at": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "content_id",
                        "external_product_id",
                        "publishing_rule_id",
                        "start_time",
                        "updated_at"
                      ]
                    }
                  }
                },
                "required": [
                  "labels"
                ]
              }
            },
            "required": [
              "product",
              "content"
            ]
          }
        },
        "currency": {
          "type": "string"
        },
        "metadata": {
          "type": "object",
          "properties": {
            "dry_run": {
              "type": "boolean"
            }
          },
          "required": [
            "dry_run"
          ]
        }
      },
      "required": [
        "payment_method",
        "items",
        "currency",
        "metadata"
      ]
    }
  },
  "required": [
    "purchase"
  ]
}
Example:
{
  "purchase": {
    "payment_method": {
      "id": "43726564697443617264_574671bd_4d65822107fcfd52",
      "payment_method_type": "CreditCard"
    },
    "items": [
      {
        "product": {
          "id": "MIDAS_PPV_2_DAY",
          "amount": 100
        },
        "content": {
          "labels": [
            {
              "content_id": "test-example",
              "external_product_id": "Some-product",
              "publishing_rule_id": null,
              "start_time": "2016-07-01T01:00:00+00:00",
              "updated_at": "2016-07-01T21:55:42+00:00"
            }
          ]
        }
      }
    ],
    "currency": "USD",
    "metadata": {
      "dry_run": false
    }
  }
}
HTTP status code 200
Success - Everything is working fine.
Body
Type: application/json
Schema:
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "purchase": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "product": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "integer"
                  },
                  "type": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "payment_method": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "payment_method_type": {
              "type": "string"
            },
            "details": {
              "type": "object",
              "properties": {
                "last-digits": {
                  "type": "string"
                }
              }
            }
          }
        },
        "id": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "amount": {
          "type": "integer"
        },
        "metadata": {
          "type": "object",
          "properties": {}
        },
        "status": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
Example:
{
  "purchase": {
    "items": [
      {
        "product": {
          "id": "MIDAS_PPV_2_DAY",
          "amount": 100,
          "type": "",
          "description": ""
        }
      },
      {
        "product": {
          "id": "Total Tax",
          "amount": 0,
          "type": "",
          "description": ""
        }
      }
    ],
    "payment_method": {
      "id": "43726564697443617264_574671bd_4d65822107fcfd52",
      "payment_method_type": "CreditCard",
      "details": {
        "last-digits": "2217"
      }
    },
    "id": "TX_57b2245b_78629a0f5f3f164f",
    "currency": "USD",
    "amount": 100,
    "metadata": {},
    "status": {
      "status": "active"
    }
  }
}
HTTP status code 400
Bad Request - Some of the parameters are missing, invalid, or malformed.
Body
Type: application/json
Example:
{"status": "error", "cause": "Request is missing required query parameter 'param name'"}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid API key."}
HTTP status code 403
Forbidden - The user does not have sufficient privileges to query the information for the specified provider.
Body
Type: application/json
Example:
{"status": "error", "cause": "The specified authentication is not authorized to access this resource."}
HTTP status code 500
Server Error - Something is wrong with the API and it might be intermittently unavailable.
Body
Type: application/json
Example:
{"status":"error","cause":"There was an unexpected error. If problems persist, please contact the application owner."}
Secured by bv-auth
Headers
- 
x-bv-password: (string)
Billing Vendor Password
 - 
x-bv-user: (string)
Billing Vendor User Account
 
get /{pCode}/accounts/{accountID}/onetime-charges
Returns a list of the PPV purchases for the account. Purchases that contain multiple products are supported.
Each request must contain the headers necessary for basic authentication.
URI Parameters
- pCode: required (string)
 - accountID: required (string)
 
HTTP status code 200
Success - Everything is working fine.
Body
Type: application/json
Schema:
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "purchase": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "product": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "integer"
                  },
                  "type": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "payment_method": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "payment_method_type": {
              "type": "string"
            },
            "details": {
              "type": "object",
              "properties": {
                "last-digits": {
                  "type": "string"
                }
              }
            }
          }
        },
        "id": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "amount": {
          "type": "integer"
        },
        "metadata": {
          "type": "object",
          "properties": {}
        },
        "status": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
Example:
{
  "purchase": {
    "items": [
      {
        "product": {
          "id": "MIDAS_PPV_2_DAY",
          "amount": 100,
          "type": "",
          "description": ""
        }
      },
      {
        "product": {
          "id": "Total Tax",
          "amount": 0,
          "type": "",
          "description": ""
        }
      }
    ],
    "payment_method": {
      "id": "43726564697443617264_574671bd_4d65822107fcfd52",
      "payment_method_type": "CreditCard",
      "details": {
        "last-digits": "2217"
      }
    },
    "id": "TX_57b2245b_78629a0f5f3f164f",
    "currency": "USD",
    "amount": 100,
    "metadata": {},
    "status": {
      "status": "active"
    }
  }
}
HTTP status code 400
Bad Request - Some of the parameters are missing, invalid, or malformed.
Body
Type: application/json
Example:
{"status": "error", "cause": "Request is missing required query parameter 'param name'"}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid API key."}
HTTP status code 403
Forbidden - The user does not have sufficient privileges to query the information for the specified provider.
Body
Type: application/json
Example:
{"status": "error", "cause": "The specified authentication is not authorized to access this resource."}
HTTP status code 500
Server Error - Something is wrong with the API and it might be intermittently unavailable.
Body
Type: application/json
Example:
{"status":"error","cause":"There was an unexpected error. If problems persist, please contact the application owner."}
Secured by bv-auth
Headers
- 
x-bv-password: (string)
Billing Vendor Password
 - 
x-bv-user: (string)
Billing Vendor User Account
 
Returns the specified PPV purchase. NOTE: NOT IMPLEMENTED
Returns the ppv puschase
get /{pCode}/accounts/{accountID}/onetime-charges/{onetimeChargeID}
Returns the ppv puschase
Each request must contain the headers necessary for basic authentication.
URI Parameters
- pCode: required (string)
 - accountID: required (string)
 - onetimeChargeID: required (string)
 
HTTP status code 200
Success - Everything is working fine.
Body
Type: application/json
Schema:
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "purchase": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "product": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "amount": {
                    "type": "integer"
                  },
                  "type": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "payment_method": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "payment_method_type": {
              "type": "string"
            },
            "details": {
              "type": "object",
              "properties": {
                "last-digits": {
                  "type": "string"
                }
              }
            }
          }
        },
        "id": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "amount": {
          "type": "integer"
        },
        "metadata": {
          "type": "object",
          "properties": {}
        },
        "status": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
Example:
{
  "purchase": {
    "items": [
      {
        "product": {
          "id": "MIDAS_PPV_2_DAY",
          "amount": 100,
          "type": "",
          "description": ""
        }
      },
      {
        "product": {
          "id": "Total Tax",
          "amount": 0,
          "type": "",
          "description": ""
        }
      }
    ],
    "payment_method": {
      "id": "43726564697443617264_574671bd_4d65822107fcfd52",
      "payment_method_type": "CreditCard",
      "details": {
        "last-digits": "2217"
      }
    },
    "id": "TX_57b2245b_78629a0f5f3f164f",
    "currency": "USD",
    "amount": 100,
    "metadata": {},
    "status": {
      "status": "active"
    }
  }
}
HTTP status code 400
Bad Request - Some of the parameters are missing, invalid, or malformed.
Body
Type: application/json
Example:
{"status": "error", "cause": "Request is missing required query parameter 'param name'"}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid API key."}
HTTP status code 403
Forbidden - The user does not have sufficient privileges to query the information for the specified provider.
Body
Type: application/json
Example:
{"status": "error", "cause": "The specified authentication is not authorized to access this resource."}
HTTP status code 500
Server Error - Something is wrong with the API and it might be intermittently unavailable.
Body
Type: application/json
Example:
{"status":"error","cause":"There was an unexpected error. If problems persist, please contact the application owner."}
Secured by bv-auth
Headers
- 
x-bv-password: (string)
Billing Vendor Password
 - 
x-bv-user: (string)
Billing Vendor User Account
 
Payment Methods
Creating a new payment method is a two step process. 1: Set up the tracking ID (token). 2: After the user submits confidential data to the payment process, confirm the payment method.
Sends payment data to create a payment method.
Returns a list of the payment method associated with the acount.
post /{pCode}/accounts/{accountID}/payment-methods
Sends payment data to create a payment method.
Each request must contain the headers necessary for basic authentication.
URI Parameters
- pCode: required (string)
 - accountID: required (string)
 
Body
Type: application/json
Schema:
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "payment_method_type": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "payment_method_type"
  ]
}
Example:
{
  "id": "CC_12345",
  "payment_method_type": "CreditCard"
}
HTTP status code 200
Success - Everything is working fine.
Body
Type: application/json
Schema:
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "payment_method": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "payment_method_type": {
          "type": "string"
        },
        "details": {
          "type": "object",
          "properties": {
            "last-digits": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
Example:
{
  "payment_method": {
    "id": "CreditCard_574de06b_32093f9949f7ce81",
    "payment_method_type": "CreditCard",
    "details": { 
      "last-digits": "2217"
    }
  }
}
HTTP status code 400
Bad Request - Some of the parameters are missing, invalid, or malformed.
Body
Type: application/json
Example:
{"status": "error", "cause": "Request is missing required query parameter 'param name'"}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid API key."}
HTTP status code 403
Forbidden - The user does not have sufficient privileges to query the information for the specified provider.
Body
Type: application/json
Example:
{"status": "error", "cause": "The specified authentication is not authorized to access this resource."}
HTTP status code 500
Server Error - Something is wrong with the API and it might be intermittently unavailable.
Body
Type: application/json
Example:
{"status":"error","cause":"There was an unexpected error. If problems persist, please contact the application owner."}
Secured by bv-auth
Headers
- 
x-bv-password: (string)
Billing Vendor Password
 - 
x-bv-user: (string)
Billing Vendor User Account
 
get /{pCode}/accounts/{accountID}/payment-methods
Returns a list of the payment method associated with the acount.
Each request must contain the headers necessary for basic authentication.
URI Parameters
- pCode: required (string)
 - accountID: required (string)
 
HTTP status code 200
Success - Everything is working fine.
Body
Type: application/json
Schema:
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "payment_method": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "payment_method_type": {
          "type": "string"
        },
        "details": {
          "type": "object",
          "properties": {
            "last-digits": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
Example:
{
  "payment_method": {
    "id": "CreditCard_574de06b_32093f9949f7ce81",
    "payment_method_type": "CreditCard",
    "details": { 
      "last-digits": "2217"
    }
  }
}
HTTP status code 400
Bad Request - Some of the parameters are missing, invalid, or malformed.
Body
Type: application/json
Example:
{"status": "error", "cause": "Request is missing required query parameter 'param name'"}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid API key."}
HTTP status code 403
Forbidden - The user does not have sufficient privileges to query the information for the specified provider.
Body
Type: application/json
Example:
{"status": "error", "cause": "The specified authentication is not authorized to access this resource."}
HTTP status code 500
Server Error - Something is wrong with the API and it might be intermittently unavailable.
Body
Type: application/json
Example:
{"status":"error","cause":"There was an unexpected error. If problems persist, please contact the application owner."}
Secured by bv-auth
Headers
- 
x-bv-password: (string)
Billing Vendor Password
 - 
x-bv-user: (string)
Billing Vendor User Account
 
Registers personal data required to create payment methods.
Directs the end user to the corresponding URL to get the payment method token.
post /{pCode}/accounts/{accountID}/payment-methods/token
Directs the end user to the corresponding URL to get the payment method token.
Each request must contain the headers necessary for basic authentication.
URI Parameters
- pCode: required (string)
 - accountID: required (string)
 
Body
Type: application/json
Schema:
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "payment_method_type": {
      "type": "string"
    },
    "metadata": {
      "type": "object",
      "properties": {
        "currency": {
          "type": "string"
        },
        "success_callback": {
          "type": "string"
        },
        "error_callback": {
          "type": "string"
        }
      },
      "required": [
        "currency",
        "success_callback",
        "error_callback"
      ]
    }
  },
  "required": [
    "payment_method_type",
    "metadata"
  ]
}
Example:
{
    "payment_method_type": "PayPal",
    "metadata": {
        "currency" : "USD",
        "success_callback" : "http://www.example.com/",
        "error_callback" : "http://www.example.com/"
    }
}
HTTP status code 200
Success - Everything is working fine.
Body
Type: application/json
Schema:
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "token": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "token": {
          "type": "string"
        }
      }
    }
  }
}
Example:
{
  "token": {
    "id": "129d7aac314c807d51955190d1ae8baa5a5a8d5b",
    "token": "https://www.sandbox.paypal.com/webscr?cmd=_express-checkout&useraction=commit&token=EC-47"
  }
}
HTTP status code 400
Bad Request - Some of the parameters are missing, invalid, or malformed.
Body
Type: application/json
Example:
{"status": "error", "cause": "Request is missing required query parameter 'param name'"}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid API key."}
HTTP status code 403
Forbidden - The user does not have sufficient privileges to query the information for the specified provider.
Body
Type: application/json
Example:
{"status": "error", "cause": "The specified authentication is not authorized to access this resource."}
HTTP status code 500
Server Error - Something is wrong with the API and it might be intermittently unavailable.
Body
Type: application/json
Example:
{"status":"error","cause":"There was an unexpected error. If problems persist, please contact the application owner."}
Secured by bv-auth
Headers
- 
x-bv-password: (string)
Billing Vendor Password
 - 
x-bv-user: (string)
Billing Vendor User Account
 
The specified payment method associated with the account. NOTE: NOT IMPLEMENTED
Removes the payment method.
Checks the payment method.
delete /{pCode}/accounts/{accountID}/payment-methods/{paymentMethodID}
Removes the payment method.
Each request must contain the headers necessary for basic authentication.
URI Parameters
- pCode: required (string)
 - accountID: required (string)
 - paymentMethodID: required (string)
 
HTTP status code 200
Success - Everything is working fine.
Body
Type: application/json
HTTP status code 400
Bad Request - Some of the parameters are missing, invalid, or malformed.
Body
Type: application/json
Example:
{"status": "error", "cause": "Request is missing required query parameter 'param name'"}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid API key."}
HTTP status code 403
Forbidden - The user does not have sufficient privileges to query the information for the specified provider.
Body
Type: application/json
Example:
{"status": "error", "cause": "The specified authentication is not authorized to access this resource."}
HTTP status code 500
Server Error - Something is wrong with the API and it might be intermittently unavailable.
Body
Type: application/json
Example:
{"status":"error","cause":"There was an unexpected error. If problems persist, please contact the application owner."}
Secured by bv-auth
Headers
- 
x-bv-password: (string)
Billing Vendor Password
 - 
x-bv-user: (string)
Billing Vendor User Account
 
get /{pCode}/accounts/{accountID}/payment-methods/{paymentMethodID}
Checks the payment method.
Each request must contain the headers necessary for basic authentication.
URI Parameters
- pCode: required (string)
 - accountID: required (string)
 - paymentMethodID: required (string)
 
HTTP status code 200
Success - Everything is working fine.
Body
Type: application/json
HTTP status code 400
Bad Request - Some of the parameters are missing, invalid, or malformed.
Body
Type: application/json
Example:
{"status": "error", "cause": "Request is missing required query parameter 'param name'"}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid API key."}
HTTP status code 403
Forbidden - The user does not have sufficient privileges to query the information for the specified provider.
Body
Type: application/json
Example:
{"status": "error", "cause": "The specified authentication is not authorized to access this resource."}
HTTP status code 500
Server Error - Something is wrong with the API and it might be intermittently unavailable.
Body
Type: application/json
Example:
{"status":"error","cause":"There was an unexpected error. If problems persist, please contact the application owner."}
Secured by bv-auth
Headers
- 
x-bv-password: (string)
Billing Vendor Password
 - 
x-bv-user: (string)
Billing Vendor User Account
 
Subscriptions
Creates subscriptions associated with an account.
Creates a new subscription for this account.
Returns the subscriptions associated with an account.
post /{pCode}/accounts/{accountID}/subscriptions
Creates a new subscription for this account.
Each request must contain the headers necessary for basic authentication.
URI Parameters
- pCode: required (string)
 - accountID: required (string)
 
Body
Type: application/json
Schema:
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "subscription": {
      "type": "object",
      "properties": {
        "payment_method": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "payment_method_type": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "payment_method_type"
          ]
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "product": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ]
              }
            },
            "required": [
              "product"
            ]
          }
        },
        "metadata": {
          "type": "object",
          "properties": {
            "currency": {
              "type": "string"
            }
          },
          "required": [
            "currency"
          ]
        }
      },
      "required": [
        "payment_method",
        "items",
        "metadata"
      ]
    }
  },
  "required": [
    "subscription"
  ]
}
Example:
{
  "subscription": {
    "payment_method" : {
      "id" : "",
      "payment_method_type": "PayPal"
    },
    "items": [{
      "product" : {
        "id" : "example"
      }
    }],
    "metadata" : {
      "currency" : "USD"
    }
  }
}
HTTP status code 200
Success - Everything is working fine.
Body
Type: application/json
Schema:
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "subscription": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "payment_method": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "payment_method_type": {
              "type": "string"
            }
          }
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "product": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "price_plan": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "cycles": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "unit": {
                              "type": "integer"
                            },
                            "period": {
                              "type": "string"
                            },
                            "cycles": {
                              "type": "integer"
                            },
                            "price": {
                              "type": "object",
                              "properties": {
                                "amount": {
                                  "type": "integer"
                                },
                                "currency": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "properties": {
                      "ooyalaEntitlementsPrefix": {
                        "type": "string"
                      }
                    }
                  },
                  "type": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "expiration-date": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "status": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string"
            }
          }
        },
        "billing_start_date": {
          "type": "string"
        },
        "price": {
          "type": "object",
          "properties": {
            "amount": {
              "type": "integer"
            },
            "currency": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
Example:
{
  "subscription": {
    "id": "AB_579a3d05_123ea66ac8af22ec",
    "payment_method": {
      "id": "MAP_578914a2_55104dc76695721d",
      "payment_method_type": "MAP"
    },
    "items": [
      {
        "product": {
          "id": "example",
          "price_plan": {
            "id": "e91bef79bf37d00330d33ea212e04bf7ae019fa1",
            "cycles": [
              {
                "unit": 1,
                "period": "Day",
                "cycles": 0,
                "price": {
                  "amount": 5,
                  "currency": "USD"
                }
              }
            ]
          },
          "metadata": {
            "ooyalaEntitlementsPrefix": "oo:"
          },
          "type": "subscription",
          "description": "example product",
          "status": "Active",
          "expiration-date": "2016-04-30T00:00:00-07:00"
        }
      }
    ],
    "status": {
      "status": "active"
    },
    "billing_start_date": "2016-07-28T10:12:41-07:00",
    "price": {
      "amount": 15,
      "currency": "USD"
    }
  }
}
HTTP status code 400
Bad Request - Some of the parameters are missing, invalid, or malformed.
Body
Type: application/json
Example:
{"status": "error", "cause": "Request is missing required query parameter 'param name'"}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid API key."}
HTTP status code 403
Forbidden - The user does not have sufficient privileges to query the information for the specified provider.
Body
Type: application/json
Example:
{"status": "error", "cause": "The specified authentication is not authorized to access this resource."}
HTTP status code 500
Server Error - Something is wrong with the API and it might be intermittently unavailable.
Body
Type: application/json
Example:
{"status":"error","cause":"There was an unexpected error. If problems persist, please contact the application owner."}
Secured by bv-auth
Headers
- 
x-bv-password: (string)
Billing Vendor Password
 - 
x-bv-user: (string)
Billing Vendor User Account
 
get /{pCode}/accounts/{accountID}/subscriptions
Returns the subscriptions associated with an account.
Each request must contain the headers necessary for basic authentication.
URI Parameters
- pCode: required (string)
 - accountID: required (string)
 
HTTP status code 200
Success - Everything is working fine.
Body
Type: application/json
Schema:
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "subscriptions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "payment_method": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "payment_method_type": {
                "type": "string"
              },
              "details": {
                "type": "object",
                "properties": {
                  "last-digits": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "product": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "status": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string"
              }
            }
          },
          "billing_start_date": {
            "type": "string"
          },
          "price_plan": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "cycles": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "unit": {
                      "type": "integer"
                    },
                    "period": {
                      "type": "string"
                    },
                    "cycles": {
                      "type": "integer"
                    },
                    "price": {
                      "type": "object",
                      "properties": {
                        "amount": {
                          "type": "number"
                        },
                        "currency": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "metadata": {
            "type": "object",
            "properties": {
              "next_billing_date_time": {
                "type": "string"
              }
            }
          },
          "price": {
            "type": "null"
          }
        }
      }
    }
  }
}
Example:
{
  "subscriptions": [
    {
      "id": "AB_5781227c_1408d2ac22c4d294",
      "payment_method": {
        "id": "43726564697443617264_574671bd_4d65822107fcfd52",
        "payment_method_type": "CreditCard",
        "details": {
          "last-digits": "2217"
        }
      },
      "items": [
        {
          "product": {
            "id": "example",
            "type": "",
            "description": ""
          }
        }
      ],
      "status": {
        "status": "active"
      },
      "billing_start_date": "2016-07-09T09:12:45-07:00",
      "price_plan": {
        "id": "BP001",
        "description": "Monthly billing plan",
        "cycles": [
          {
            "unit": 1,
            "period": "Month",
            "cycles": 0,
            "price": {
              "amount": 0.99,
              "currency": "USD"
            }
          }
        ]
      },
      "metadata": {
        "next_billing_date_time": "2016-09-09T00:00:00-07:00"
      },
      "price": null
    }
  ]
}
HTTP status code 400
Bad Request - Some of the parameters are missing, invalid, or malformed.
Body
Type: application/json
Example:
{"status": "error", "cause": "Request is missing required query parameter 'param name'"}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid API key."}
HTTP status code 403
Forbidden - The user does not have sufficient privileges to query the information for the specified provider.
Body
Type: application/json
Example:
{"status": "error", "cause": "The specified authentication is not authorized to access this resource."}
HTTP status code 500
Server Error - Something is wrong with the API and it might be intermittently unavailable.
Body
Type: application/json
Example:
{"status":"error","cause":"There was an unexpected error. If problems persist, please contact the application owner."}
Secured by bv-auth
Headers
- 
x-bv-password: (string)
Billing Vendor Password
 - 
x-bv-user: (string)
Billing Vendor User Account
 
The specified subscription associated with an account.
This changes the status of the subscription to cancelled.
Updates a specific invoice.
Returns the specified subscription for the account.
delete /{pCode}/accounts/{accountID}/subscriptions/{subscriptionID}
This changes the status of the subscription to cancelled.
Each request must contain the headers necessary for basic authentication.
URI Parameters
- pCode: required (string)
 - accountID: required (string)
 - subscriptionID: required (string)
 
HTTP status code 200
No Content
HTTP status code 400
Bad Request - Some of the parameters are missing, invalid, or malformed.
Body
Type: application/json
Example:
{"status": "error", "cause": "Request is missing required query parameter 'param name'"}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid API key."}
HTTP status code 403
Forbidden - The user does not have sufficient privileges to query the information for the specified provider.
Body
Type: application/json
Example:
{"status": "error", "cause": "The specified authentication is not authorized to access this resource."}
HTTP status code 500
Server Error - Something is wrong with the API and it might be intermittently unavailable.
Body
Type: application/json
Example:
{"status":"error","cause":"There was an unexpected error. If problems persist, please contact the application owner."}
Secured by bv-auth
Headers
- 
x-bv-password: (string)
Billing Vendor Password
 - 
x-bv-user: (string)
Billing Vendor User Account
 
put /{pCode}/accounts/{accountID}/subscriptions/{subscriptionID}
Updates a specific invoice.
Each request must contain the headers necessary for basic authentication.
URI Parameters
- pCode: required (string)
 - accountID: required (string)
 - subscriptionID: required (string)
 
Body
Type: application/json
Schema:
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "update": {
      "type": "string"
    },
    "subscription": {
      "type": "object",
      "properties": {
        "payment_method": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string"
            },
            "details": {
              "type": "object",
              "properties": {
                "token": {
                  "type": "string"
                }
              },
              "required": [
                "token"
              ]
            }
          },
          "required": [
            "type",
            "details"
          ]
        }
      },
      "required": [
        "payment_method"
      ]
    }
  },
  "required": [
    "update",
    "subscription"
  ]
}
Example:
{
  "update":"authorizePayment",
  "subscription":{
    "payment_method":{
      "type":"Hosted",
      "details":{
        "token": "eb1ea101f959e6abd40605ab27e3b16c325f851d"
      }
    }
  }
}
HTTP status code 200
Success - Everything is working fine.
Body
Type: application/json
Schema:
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "subscription": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "payment_method": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "payment_method_type": {
              "type": "string"
            },
            "details": {
              "type": "object",
              "properties": {
                "last-digits": {
                  "type": "string"
                }
              }
            }
          }
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "product": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "status": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string"
            }
          }
        },
        "billing_start_date": {
          "type": "string"
        },
        "metadata": {
          "type": "object",
          "properties": {
            "next_billing_date_time": {
              "type": "string"
            }
          }
        },
        "price": {
          "type": "object",
          "properties": {
            "amount": {
              "type": "integer"
            },
            "currency": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
Example:
{
  "subscription":{
    "id":"AB_5781227c_1408d2ac22c4d294",
    "payment_method":{
      "id":"43726564697443617264_574671bd_4d65822107fcfd52",
      "payment_method_type":"CreditCard",
      "details":{
        "last-digits":"2217"
      }
    },
    "items":[{
      "product":{
        "id":"example",
        "type":"",
        "description":""
      }
    }],
    "status":{
      "status":"active"
    },
    "billing_start_date":"2016-07-09T09:12:45-07:00",
    "metadata":{
      "next_billing_date_time":"2016-09-09T00:00:00-07:00"
    },
    "price":{
      "amount":15,
      "currency":"USD"
    }
  }
}
HTTP status code 400
Bad Request - Some of the parameters are missing, invalid, or malformed.
Body
Type: application/json
Example:
{"status": "error", "cause": "Request is missing required query parameter 'param name'"}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid API key."}
HTTP status code 403
Forbidden - The user does not have sufficient privileges to query the information for the specified provider.
Body
Type: application/json
Example:
{"status": "error", "cause": "The specified authentication is not authorized to access this resource."}
HTTP status code 500
Server Error - Something is wrong with the API and it might be intermittently unavailable.
Body
Type: application/json
Example:
{"status":"error","cause":"There was an unexpected error. If problems persist, please contact the application owner."}
Secured by bv-auth
Headers
- 
x-bv-password: (string)
Billing Vendor Password
 - 
x-bv-user: (string)
Billing Vendor User Account
 
get /{pCode}/accounts/{accountID}/subscriptions/{subscriptionID}
Returns the specified subscription for the account.
Each request must contain the headers necessary for basic authentication.
URI Parameters
- pCode: required (string)
 - accountID: required (string)
 - subscriptionID: required (string)
 
HTTP status code 200
Success - Everything is working fine.
Body
Type: application/json
Schema:
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "subscription": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "payment_method": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "payment_method_type": {
              "type": "string"
            },
            "details": {
              "type": "object",
              "properties": {
                "last-digits": {
                  "type": "string"
                }
              }
            }
          }
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "product": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "status": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string"
            }
          }
        },
        "billing_start_date": {
          "type": "string"
        },
        "metadata": {
          "type": "object",
          "properties": {
            "next_billing_date_time": {
              "type": "string"
            }
          }
        },
        "price": {
          "type": "null"
        }
      }
    }
  }
}
Example:
{
  "subscription":{
    "id":"AB_5781227c_1408d2ac22c4d294",
    "payment_method":{
      "id":"43726564697443617264_574671bd_4d65822107fcfd52",
      "payment_method_type":"CreditCard",
      "details":{
        "last-digits":"2217"
      }
    },
    "items":[{
      "product":{
        "id":"example",
        "type":"",
        "description":""
      }
    }],
    "status":{
      "status":"active"
    },
    "billing_start_date":"2016-07-09T09:12:45-07:00",
    "metadata":{
      "next_billing_date_time":"2016-09-09T00:00:00-07:00"
    },
    "price":null
  }
}
HTTP status code 400
Bad Request - Some of the parameters are missing, invalid, or malformed.
Body
Type: application/json
Example:
{"status": "error", "cause": "Request is missing required query parameter 'param name'"}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid API key."}
HTTP status code 403
Forbidden - The user does not have sufficient privileges to query the information for the specified provider.
Body
Type: application/json
Example:
{"status": "error", "cause": "The specified authentication is not authorized to access this resource."}
HTTP status code 500
Server Error - Something is wrong with the API and it might be intermittently unavailable.
Body
Type: application/json
Example:
{"status":"error","cause":"There was an unexpected error. If problems persist, please contact the application owner."}
Secured by bv-auth
Headers
- 
x-bv-password: (string)
Billing Vendor Password
 - 
x-bv-user: (string)
Billing Vendor User Account