Happy Business Starts Here

Highlighted
Scholar

how to update "Notes" field in an existing subscription using REST API?

Hi,

 

  I used the following REST APIs to update "Notes" field in a existing Subscription. But I am receiving following error messages.

can you help us on this ?

REST-API

https://rest.apisandbox.zuora.com/v1/subscriptions/{subscription-key}

Request object :

{

    "notes": "update subscription notes here"

}

This returns “Subscription api cannot be used when order is enabled.

Later I referred the link - https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AB_Orders_API_Migration_Guidance

 

Based on the guidance I used the following API which is also not successful.

REST API

https://rest.apisandbox.zuora.com/v1/orders

{
"existingAccountNumber": "XXXXXXX",
"orderDate": "2022-05-22",
"subscriptions": [
{
"orderActions": [
{
"createSubscription": {
"subscriptionNumber": "A-S00000330",
"notes": "update outbound model here",
"terms": {
"initialTerm": {
"termType": "EVERGREEN"
}
}
},
"type": "CreateSubscription"
}
]
}
]
}

This returns “The subscription number A-S00000330 is already in use. Please enter another subscription number.”

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Zuora Staff

Re: how to update "Notes" field in an existing subscription using REST API?

Hi, 

Are you okay to update 'Notes' using Subscription Id? 
If yes, you can use the below API. 

REST API URL: https://rest.apisandbox.zuora.com/v1/action/update

Method:  POST

Request Body

{
  "objects": [
    {
      "Id": "8ac6819b71a69a2b0171a775375a00df",
      "Notes": "Notes Updated"
    }
  ],
  "type": "Subscription"
}

Response from Zuora

[
    {
        "Success": true,
        "Id": "8ac6819b71a69a2b0171a775375a00df"
    }
]

Ref: https://www.zuora.com/developer/api-reference/#operation/Action_POSTupdate
Thanks,

Prem

Thanks and Regards,
Prem Anandh

View solution in original post

1 REPLY 1
Highlighted
Zuora Staff

Re: how to update "Notes" field in an existing subscription using REST API?

Hi, 

Are you okay to update 'Notes' using Subscription Id? 
If yes, you can use the below API. 

REST API URL: https://rest.apisandbox.zuora.com/v1/action/update

Method:  POST

Request Body

{
  "objects": [
    {
      "Id": "8ac6819b71a69a2b0171a775375a00df",
      "Notes": "Notes Updated"
    }
  ],
  "type": "Subscription"
}

Response from Zuora

[
    {
        "Success": true,
        "Id": "8ac6819b71a69a2b0171a775375a00df"
    }
]

Ref: https://www.zuora.com/developer/api-reference/#operation/Action_POSTupdate
Thanks,

Prem

Thanks and Regards,
Prem Anandh

View solution in original post