Skip to content

Latest commit

 

History

History
1117 lines (798 loc) · 80.6 KB

CreditMemosApi.md

File metadata and controls

1117 lines (798 loc) · 80.6 KB

zuora_client.CreditMemosApi

All URIs are relative to https://rest.zuora.com

Method HTTP request Description
d_elete_credit_memo DELETE /v1/creditmemos/{creditMemoId} Delete credit memo
g_et_breakdown_credit_memo_by_order GET /v1/creditmemos/{creditMemoNumber}/amountBreakdownByOrder Get breakdown of credit memo by order
g_et_credit_memo GET /v1/creditmemos/{creditMemoId} Get credit memo
g_et_credit_memo_item GET /v1/creditmemos/{creditMemoId}/items/{cmitemid} Get credit memo item
g_et_credit_memo_item_part GET /v1/creditmemos/{creditMemoId}/parts/{partid}/itemparts/{itempartid} Get credit memo part item
g_et_credit_memo_item_parts GET /v1/creditmemos/{creditMemoId}/parts/{partid}/itemparts Get credit memo part items
g_et_credit_memo_items GET /v1/creditmemos/{creditMemoId}/items Get credit memo items
g_et_credit_memo_part GET /v1/creditmemos/{creditMemoId}/parts/{partid} Get credit memo part
g_et_credit_memo_parts GET /v1/creditmemos/{creditMemoId}/parts Get credit memo parts
g_et_credit_memos GET /v1/creditmemos Get credit memos
p_ost_credit_memo_from_prpc POST /v1/creditmemos Create credit memo from charge
p_ost_credit_memo_pdf POST /v1/creditmemos/{creditMemoId}/pdfs Create credit memo PDF
p_ost_email_credit_memo POST /v1/creditmemos/{creditMemoId}/emails Email credit memo
p_ost_refund_credit_memo POST /v1/creditmemos/{creditmemoId}/refunds Refund credit memo
p_ostcm_taxation_items POST /v1/creditmemos/{creditMemoId}/taxationitems Create taxation items for credit memo
p_ut_apply_credit_memo PUT /v1/creditmemos/{creditMemoId}/apply Apply credit memo
p_ut_cancel_credit_memo PUT /v1/creditmemos/{creditMemoId}/cancel Cancel credit memo
p_ut_post_credit_memo PUT /v1/creditmemos/{creditMemoId}/post Post credit memo
p_ut_unapply_credit_memo PUT /v1/creditmemos/{creditMemoId}/unapply Unapply credit memo
p_ut_unpost_credit_memo PUT /v1/creditmemos/{creditMemoId}/unpost Unpost credit memo
p_ut_update_credit_memo PUT /v1/creditmemos/{creditMemoId} Update credit memo

d_elete_credit_memo

CommonResponseType d_elete_credit_memo(credit_memo_id, zuora_entity_ids=zuora_entity_ids)

Delete credit memo

Note: The Invoice Settlement feature is in Limited Availability. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you wish to have access to the feature, submit a request at Zuora Global Support. Deletes a credit memo. Only credit memos with the Cancelled status can be deleted. You can delete a credit memo only if you have the user permission. See Billing Roles for more information.

Example

from __future__ import print_function
import time
import zuora_client
from zuora_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = zuora_client.CreditMemosApi()
credit_memo_id = 'credit_memo_id_example' # str | The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172. 
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)

try:
    # Delete credit memo
    api_response = api_instance.d_elete_credit_memo(credit_memo_id, zuora_entity_ids=zuora_entity_ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditMemosApi->d_elete_credit_memo: %s\n" % e)

Parameters

Name Type Description Notes
credit_memo_id str The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]

Return type

CommonResponseType

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

g_et_breakdown_credit_memo_by_order

GetCreditMemoAmountBreakdownByOrderResponse g_et_breakdown_credit_memo_by_order(credit_memo_number, zuora_entity_ids=zuora_entity_ids)

Get breakdown of credit memo by order

Note: This operation is only available if you have the Invoice Settlement and Order Metrics features enabled. If you wish to have access to the features, submit a request at Zuora Global Support. If you have the Orders feature enabled, you already have the Order Metrics feature enabled. Retrieves a specified credit memo that is broken down by orders. The credit memo items might be broken down into a list of order rated items. You can only use this operation to retrieve breakdowns of credit memos whose source value is BillRun or API.

Example

from __future__ import print_function
import time
import zuora_client
from zuora_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = zuora_client.CreditMemosApi()
credit_memo_number = 'credit_memo_number_example' # str | Number of credit memo to be broken down.
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)

try:
    # Get breakdown of credit memo by order
    api_response = api_instance.g_et_breakdown_credit_memo_by_order(credit_memo_number, zuora_entity_ids=zuora_entity_ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditMemosApi->g_et_breakdown_credit_memo_by_order: %s\n" % e)

Parameters

Name Type Description Notes
credit_memo_number str Number of credit memo to be broken down.
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]

Return type

GetCreditMemoAmountBreakdownByOrderResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

g_et_credit_memo

GETCreditMemoType g_et_credit_memo(credit_memo_id, zuora_entity_ids=zuora_entity_ids)

Get credit memo

Note: The Invoice Settlement feature is in Limited Availability. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you wish to have access to the feature, submit a request at Zuora Global Support. Retrieves the information about a specific credit memo.

Example

from __future__ import print_function
import time
import zuora_client
from zuora_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = zuora_client.CreditMemosApi()
credit_memo_id = 'credit_memo_id_example' # str | The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172. 
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)

try:
    # Get credit memo
    api_response = api_instance.g_et_credit_memo(credit_memo_id, zuora_entity_ids=zuora_entity_ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditMemosApi->g_et_credit_memo: %s\n" % e)

Parameters

Name Type Description Notes
credit_memo_id str The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]

Return type

GETCreditMemoType

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

g_et_credit_memo_item

GETCreditMemoItemType g_et_credit_memo_item(cmitemid, credit_memo_id, zuora_entity_ids=zuora_entity_ids)

Get credit memo item

Note: The Invoice Settlement feature is in Limited Availability. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you wish to have access to the feature, submit a request at Zuora Global Support. Retrieves the information about a specific item of a credit memo. A credit memo item is a single line item in a credit memo.

Example

from __future__ import print_function
import time
import zuora_client
from zuora_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = zuora_client.CreditMemosApi()
cmitemid = 'cmitemid_example' # str | The unique ID of a credit memo item. You can get the credit memo item ID from the response of [Get credit memo items](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoItems). 
credit_memo_id = 'credit_memo_id_example' # str | The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172. 
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)

try:
    # Get credit memo item
    api_response = api_instance.g_et_credit_memo_item(cmitemid, credit_memo_id, zuora_entity_ids=zuora_entity_ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditMemosApi->g_et_credit_memo_item: %s\n" % e)

Parameters

Name Type Description Notes
cmitemid str The unique ID of a credit memo item. You can get the credit memo item ID from the response of Get credit memo items.
credit_memo_id str The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]

Return type

GETCreditMemoItemType

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

g_et_credit_memo_item_part

GETCreditMemoItemPartType g_et_credit_memo_item_part(partid, itempartid, credit_memo_id, zuora_entity_ids=zuora_entity_ids)

Get credit memo part item

Note: The Invoice Settlement feature is in Limited Availability. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you wish to have access to the feature, submit a request at Zuora Global Support. Retrieves the information about a specific credit memo part item. A credit memo part item is a single line item in a credit memo part. A credit memo part can consist of several different types of items.

Example

from __future__ import print_function
import time
import zuora_client
from zuora_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = zuora_client.CreditMemosApi()
partid = 'partid_example' # str | The unique ID of a specific credit memo part. You can get the credit memo part ID from the response of [Get credit memo parts](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoParts). 
itempartid = 'itempartid_example' # str | The unique ID of a specific credit memo part item. You can get the credit memo part item ID from the response of [Get credit memo part items](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoItemParts). 
credit_memo_id = 'credit_memo_id_example' # str | The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172. 
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)

try:
    # Get credit memo part item
    api_response = api_instance.g_et_credit_memo_item_part(partid, itempartid, credit_memo_id, zuora_entity_ids=zuora_entity_ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditMemosApi->g_et_credit_memo_item_part: %s\n" % e)

Parameters

Name Type Description Notes
partid str The unique ID of a specific credit memo part. You can get the credit memo part ID from the response of Get credit memo parts.
itempartid str The unique ID of a specific credit memo part item. You can get the credit memo part item ID from the response of Get credit memo part items.
credit_memo_id str The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]

Return type

GETCreditMemoItemPartType

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

g_et_credit_memo_item_parts

GETCreditMemoItemPartsCollectionType g_et_credit_memo_item_parts(partid, credit_memo_id, zuora_entity_ids=zuora_entity_ids, page_size=page_size)

Get credit memo part items

Note: The Invoice Settlement feature is in Limited Availability. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you wish to have access to the feature, submit a request at Zuora Global Support. Retrieves the information about all items of a credit memo part. A credit memo part item is a single line item in a credit memo part. A credit memo part can consist of several different types of items.

Example

from __future__ import print_function
import time
import zuora_client
from zuora_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = zuora_client.CreditMemosApi()
partid = 'partid_example' # str | The unique ID of a specific credit memo part. You can get the credit memo part ID from the response of [Get credit memo parts](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoParts). . 
credit_memo_id = 'credit_memo_id_example' # str | The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172. 
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)
page_size = 20 # int | Number of rows returned per page.  (optional) (default to 20)

try:
    # Get credit memo part items
    api_response = api_instance.g_et_credit_memo_item_parts(partid, credit_memo_id, zuora_entity_ids=zuora_entity_ids, page_size=page_size)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditMemosApi->g_et_credit_memo_item_parts: %s\n" % e)

Parameters

Name Type Description Notes
partid str The unique ID of a specific credit memo part. You can get the credit memo part ID from the response of Get credit memo parts. .
credit_memo_id str The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]
page_size int Number of rows returned per page. [optional] [default to 20]

Return type

GETCreditMemoItemPartsCollectionType

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

g_et_credit_memo_items

GETCreditMemoItemsListType g_et_credit_memo_items(credit_memo_id, zuora_entity_ids=zuora_entity_ids, page_size=page_size, fields_filterable=fields_filterable, sort=sort)

Get credit memo items

Note: The Invoice Settlement feature is in Limited Availability. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you wish to have access to the feature, submit a request at Zuora Global Support. Retrieves the information about all items of a credit memo. A credit memo item is a single line item in a credit memo.

Example

from __future__ import print_function
import time
import zuora_client
from zuora_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = zuora_client.CreditMemosApi()
credit_memo_id = 'credit_memo_id_example' # str | The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172. 
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)
page_size = 20 # int | Number of rows returned per page.  (optional) (default to 20)
fields_filterable = 'fields_filterable_example' # str | This parameter restricts the data returned in the response. You can use this parameter to supply a dimension you want to filter on.   A single filter uses the following form:   *fieldsFilterable* `=` *field_value*              Filters can be combined by using `&`. For example: *fieldsFilterable* `=` *field_value* `&` *fieldsFilterable* `=` *field_value*  *fieldsFilterable* indicates the name of a supported field that you can use to filter the response data. The supported filterable fields of this operation are as below:    - id   - amount   - appliedAmount   - refundAmount   - sku   - skuName   - serviceStartDate   - serviceEndDate   - sourceItemId   - createdDate   - createdById   - updatedDate   - updatedById   - subscriptionId   *field_value* indicates a valid value of the filterable field. If the type of the field value is string, you can set the field to `null` value for filtering. Then, you can get the response data with this field value being 'null'. For more information about these fields, see the field descriptions in the **Responses** section.     Examples:  - /v1/creditmemos/402890245c7ca371015c7cb40ac30015/items?amount=100  - /v1/creditmemos/402890245c7ca371015c7cb40ac30015/items?amount=100&sort=createdDate  (optional)
sort = 'sort_example' # str | This parameter restricts the order of the data returned in the response. You can use this parameter to supply a dimension you want to sort on.  A sortable field uses the following form:   *operator* *field_name*  You can use at most two sortable fields in one URL path. Use a comma to separate sortable fields. For example:  *operator* *field_name*, *operator* *field_name*    *operator* is used to mark the order of sequencing. The operator is optional. If you only specify the sortable field without any operator, the response data is sorted in descending order by this field.    - The `-` operator indicates an ascending order.   - The `+` operator indicates a descending order.  By default, the response data is displayed in descending order by updated date.  *field_name* indicates the name of a sortable field. The supported sortable fields of this operation are as below:    - id   - amount   - appliedAmount   - refundAmount   - sku   - skuName   - serviceStartDate   - serviceEndDate   - sourceItemId   - createdDate   - createdById   - updatedDate   - updatedById   - subscriptionId    Examples:  - /v1/creditmemos/402890245c7ca371015c7cb40ac30015/items?sort=createdDate  - /v1/creditmemos/402890245c7ca371015c7cb40ac30015/items?amount=100&sort=createdDate  (optional)

try:
    # Get credit memo items
    api_response = api_instance.g_et_credit_memo_items(credit_memo_id, zuora_entity_ids=zuora_entity_ids, page_size=page_size, fields_filterable=fields_filterable, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditMemosApi->g_et_credit_memo_items: %s\n" % e)

Parameters

Name Type Description Notes
credit_memo_id str The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]
page_size int Number of rows returned per page. [optional] [default to 20]
fields_filterable str This parameter restricts the data returned in the response. You can use this parameter to supply a dimension you want to filter on. A single filter uses the following form: fieldsFilterable `=` field_value Filters can be combined by using `&`. For example: fieldsFilterable `=` field_value `&` fieldsFilterable `=` field_value fieldsFilterable indicates the name of a supported field that you can use to filter the response data. The supported filterable fields of this operation are as below: - id - amount - appliedAmount - refundAmount - sku - skuName - serviceStartDate - serviceEndDate - sourceItemId - createdDate - createdById - updatedDate - updatedById - subscriptionId field_value indicates a valid value of the filterable field. If the type of the field value is string, you can set the field to `null` value for filtering. Then, you can get the response data with this field value being 'null'. For more information about these fields, see the field descriptions in the Responses section. Examples: - /v1/creditmemos/402890245c7ca371015c7cb40ac30015/items?amount=100 - /v1/creditmemos/402890245c7ca371015c7cb40ac30015/items?amount=100&sort=createdDate [optional]
sort str This parameter restricts the order of the data returned in the response. You can use this parameter to supply a dimension you want to sort on. A sortable field uses the following form: operator field_name You can use at most two sortable fields in one URL path. Use a comma to separate sortable fields. For example: operator field_name, operator field_name operator is used to mark the order of sequencing. The operator is optional. If you only specify the sortable field without any operator, the response data is sorted in descending order by this field. - The `-` operator indicates an ascending order. - The `+` operator indicates a descending order. By default, the response data is displayed in descending order by updated date. field_name indicates the name of a sortable field. The supported sortable fields of this operation are as below: - id - amount - appliedAmount - refundAmount - sku - skuName - serviceStartDate - serviceEndDate - sourceItemId - createdDate - createdById - updatedDate - updatedById - subscriptionId Examples: - /v1/creditmemos/402890245c7ca371015c7cb40ac30015/items?sort=createdDate - /v1/creditmemos/402890245c7ca371015c7cb40ac30015/items?amount=100&sort=createdDate [optional]

Return type

GETCreditMemoItemsListType

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

g_et_credit_memo_part

GETCreditMemoPartType g_et_credit_memo_part(partid, credit_memo_id, zuora_entity_ids=zuora_entity_ids)

Get credit memo part

Note: The Invoice Settlement feature is in Limited Availability. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you wish to have access to the feature, submit a request at Zuora Global Support. Retrieves the information about a specific credit memo part. A credit memo can consist of an unapplied part, and several parts applied to invoices and debit memos.

Example

from __future__ import print_function
import time
import zuora_client
from zuora_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = zuora_client.CreditMemosApi()
partid = 'partid_example' # str | The unique ID of a specific credit memo part. You can get the credit memo part ID from the response of [Get credit memo parts](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoParts). 
credit_memo_id = 'credit_memo_id_example' # str | The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172. 
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)

try:
    # Get credit memo part
    api_response = api_instance.g_et_credit_memo_part(partid, credit_memo_id, zuora_entity_ids=zuora_entity_ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditMemosApi->g_et_credit_memo_part: %s\n" % e)

Parameters

Name Type Description Notes
partid str The unique ID of a specific credit memo part. You can get the credit memo part ID from the response of Get credit memo parts.
credit_memo_id str The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]

Return type

GETCreditMemoPartType

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

g_et_credit_memo_parts

GETCreditMemoPartsCollectionType g_et_credit_memo_parts(credit_memo_id, zuora_entity_ids=zuora_entity_ids, page_size=page_size)

Get credit memo parts

Note: The Invoice Settlement feature is in Limited Availability. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you wish to have access to the feature, submit a request at Zuora Global Support. Retrieves the information about all parts of a credit memo. A credit memo can consist of an unapplied part, and several parts applied to invoices and debit memos. You can use this operation to get all the applied and unapplied portions of a credit memo.

Example

from __future__ import print_function
import time
import zuora_client
from zuora_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = zuora_client.CreditMemosApi()
credit_memo_id = 'credit_memo_id_example' # str | The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172. 
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)
page_size = 20 # int | Number of rows returned per page.  (optional) (default to 20)

try:
    # Get credit memo parts
    api_response = api_instance.g_et_credit_memo_parts(credit_memo_id, zuora_entity_ids=zuora_entity_ids, page_size=page_size)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditMemosApi->g_et_credit_memo_parts: %s\n" % e)

Parameters

Name Type Description Notes
credit_memo_id str The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]
page_size int Number of rows returned per page. [optional] [default to 20]

Return type

GETCreditMemoPartsCollectionType

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

g_et_credit_memos

GETCreditMemoCollectionType g_et_credit_memos(zuora_entity_ids=zuora_entity_ids, page_size=page_size, fields_filterable=fields_filterable, sort=sort)

Get credit memos

Note: The Invoice Settlement feature is in Limited Availability. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you wish to have access to the feature, submit a request at Zuora Global Support. Retrieves the information about all credit memos.

Example

from __future__ import print_function
import time
import zuora_client
from zuora_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = zuora_client.CreditMemosApi()
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)
page_size = 20 # int | Number of rows returned per page.  (optional) (default to 20)
fields_filterable = 'fields_filterable_example' # str | This parameter restricts the data returned in the response. You can use this parameter to supply a dimension you want to filter on.   A single filter uses the following form:   *fieldsFilterable* `=` *field_value*              Filters can be combined by using `&`. For example: *fieldsFilterable* `=` *field_value* `&` *fieldsFilterable* `=` *field_value*  *fieldsFilterable* indicates the name of a supported field that you can use to filter the response data. The supported filterable fields of this operation are as below:    - number   - accountId    - currency   - creditMemoDate   - targetDate   - status   - amount   - taxAmount   - totalTaxExemptAmount   - unappliedAmount   - refundAmount   - appliedAmount   - referredInvoiceId   - transferredToAccounting   - createdDate   - createdById   - updatedDate   - updatedById   - autoApplyUponPosting   - excludeFromAutoApplyRules   *field_value* indicates a valid value of the filterable field. If the type of the field value is string, you can set the field to `null` value for filtering. Then, you can get the response data with this field value being 'null'. For more information about these fields, see the field descriptions in the **Responses** section.     Examples:  - /v1/creditmemos?status=Processed  - /v1/creditmemos?referredInvoiceId=null&status=Draft  - /v1/creditmemos?status=Processed&type=External&sort=+number  (optional)
sort = 'sort_example' # str | This parameter restricts the order of the data returned in the response. You can use this parameter to supply a dimension you want to sort on.  A sortable field uses the following form:   *operator* *field_name*  You can use at most two sortable fields in one URL path. Use a comma to separate sortable fields. For example:  *operator* *field_name*, *operator* *field_name*    *operator* is used to mark the order of sequencing. The operator is optional. If you only specify the sortable field without any operator, the response data is sorted in descending order by this field.    - The `-` operator indicates an ascending order.   - The `+` operator indicates a descending order.  By default, the response data is displayed in descending order by credit memo number.  *field_name* indicates the name of a sortable field. The supported sortable fields of this operation are as below:    - number   - accountId    - creditMemoDate   - targetDate   - status   - amount   - taxAmount   - totalTaxExemptAmount   - unappliedAmount   - refundAmount   - appliedAmount   - referredInvoiceId   - transferredToAccounting   - createdDate   - createdById   - updatedDate     Examples:  - /v1/creditmemos?sort=+number  - /v1/creditmemos?status=Processed&sort=-number,+amount  (optional)

try:
    # Get credit memos
    api_response = api_instance.g_et_credit_memos(zuora_entity_ids=zuora_entity_ids, page_size=page_size, fields_filterable=fields_filterable, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditMemosApi->g_et_credit_memos: %s\n" % e)

Parameters

Name Type Description Notes
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]
page_size int Number of rows returned per page. [optional] [default to 20]
fields_filterable str This parameter restricts the data returned in the response. You can use this parameter to supply a dimension you want to filter on. A single filter uses the following form: fieldsFilterable `=` field_value Filters can be combined by using `&`. For example: fieldsFilterable `=` field_value `&` fieldsFilterable `=` field_value fieldsFilterable indicates the name of a supported field that you can use to filter the response data. The supported filterable fields of this operation are as below: - number - accountId - currency - creditMemoDate - targetDate - status - amount - taxAmount - totalTaxExemptAmount - unappliedAmount - refundAmount - appliedAmount - referredInvoiceId - transferredToAccounting - createdDate - createdById - updatedDate - updatedById - autoApplyUponPosting - excludeFromAutoApplyRules field_value indicates a valid value of the filterable field. If the type of the field value is string, you can set the field to `null` value for filtering. Then, you can get the response data with this field value being 'null'. For more information about these fields, see the field descriptions in the Responses section. Examples: - /v1/creditmemos?status=Processed - /v1/creditmemos?referredInvoiceId=null&status=Draft - /v1/creditmemos?status=Processed&type=External&sort=+number [optional]
sort str This parameter restricts the order of the data returned in the response. You can use this parameter to supply a dimension you want to sort on. A sortable field uses the following form: operator field_name You can use at most two sortable fields in one URL path. Use a comma to separate sortable fields. For example: operator field_name, operator field_name operator is used to mark the order of sequencing. The operator is optional. If you only specify the sortable field without any operator, the response data is sorted in descending order by this field. - The `-` operator indicates an ascending order. - The `+` operator indicates a descending order. By default, the response data is displayed in descending order by credit memo number. field_name indicates the name of a sortable field. The supported sortable fields of this operation are as below: - number - accountId - creditMemoDate - targetDate - status - amount - taxAmount - totalTaxExemptAmount - unappliedAmount - refundAmount - appliedAmount - referredInvoiceId - transferredToAccounting - createdDate - createdById - updatedDate Examples: - /v1/creditmemos?sort=+number - /v1/creditmemos?status=Processed&sort=-number,+amount [optional]

Return type

GETCreditMemoCollectionType

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

p_ost_credit_memo_from_prpc

GETCreditMemoType p_ost_credit_memo_from_prpc(body, zuora_entity_ids=zuora_entity_ids, zuora_version=zuora_version)

Create credit memo from charge

Note: The Invoice Settlement feature is in Limited Availability. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you wish to have access to the feature, submit a request at Zuora Global Support. Creates an ad-hoc credit memo from a product rate plan charge. Zuora only supports one-time negative charges for credit memos. You can create a credit memo only if you have the user permission. See Billing Roles for more information.

Example

from __future__ import print_function
import time
import zuora_client
from zuora_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = zuora_client.CreditMemosApi()
body = zuora_client.CreditMemoFromChargeType() # CreditMemoFromChargeType | 
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)
zuora_version = 'zuora_version_example' # str |  The minor version of the Zuora REST API.   You need to set this parameter if you use the following fields: * amount * memoItemAmount  (optional)

try:
    # Create credit memo from charge
    api_response = api_instance.p_ost_credit_memo_from_prpc(body, zuora_entity_ids=zuora_entity_ids, zuora_version=zuora_version)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditMemosApi->p_ost_credit_memo_from_prpc: %s\n" % e)

Parameters

Name Type Description Notes
body CreditMemoFromChargeType
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]
zuora_version str The minor version of the Zuora REST API. You need to set this parameter if you use the following fields: * amount * memoItemAmount [optional]

Return type

GETCreditMemoType

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

p_ost_credit_memo_pdf

POSTMemoPdfResponse p_ost_credit_memo_pdf(credit_memo_id, zuora_entity_ids=zuora_entity_ids)

Create credit memo PDF

Note: The Invoice Settlement feature is in Limited Availability. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you wish to have access to the feature, submit a request at Zuora Global Support. Creates a PDF file for a specified credit memo. To access the generated PDF file, you can download it by clicking View PDF on the detailed credit memo page through the Zuora UI. This REST API operation can be used only if you have the Billing user permission "Regenerate PDF" enabled.

Example

from __future__ import print_function
import time
import zuora_client
from zuora_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = zuora_client.CreditMemosApi()
credit_memo_id = 'credit_memo_id_example' # str | The unique ID of the credit memo that you want to create a PDF file for. For example, 8a8082e65b27f6c3015ba45ff82c7172. 
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)

try:
    # Create credit memo PDF
    api_response = api_instance.p_ost_credit_memo_pdf(credit_memo_id, zuora_entity_ids=zuora_entity_ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditMemosApi->p_ost_credit_memo_pdf: %s\n" % e)

Parameters

Name Type Description Notes
credit_memo_id str The unique ID of the credit memo that you want to create a PDF file for. For example, 8a8082e65b27f6c3015ba45ff82c7172.
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]

Return type

POSTMemoPdfResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

p_ost_email_credit_memo

CommonResponseType p_ost_email_credit_memo(request, credit_memo_id, zuora_entity_ids=zuora_entity_ids)

Email credit memo

Note: The Invoice Settlement feature is in Limited Availability. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you wish to have access to the feature, submit a request at Zuora Global Support. Sends a posted credit memo to the specified email addresses manually. ## Notes - You must activate the Email Credit Memo | Manually email Credit Memo notification before emailing credit memos. To include the credit memo PDF in the email, select the Include Credit Memo PDF check box in the Edit notification dialog from the Zuora UI. See Create and Edit Notifications for more information. - Zuora sends the email messages based on the email template you set. You can set the email template to use in the Delivery Options panel of the Edit notification dialog from the Zuora UI. By default, the Manual Email for Credit Memo Default Template template is used. See Create and Edit Email Templates for more information. - The credit memos are sent only to the work email addresses or personal email addresses of the Bill To contact if the following conditions are all met: * The useEmailTemplateSetting field is set to false. * The email addresses are not specified in the emailAddresses field.

Example

from __future__ import print_function
import time
import zuora_client
from zuora_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = zuora_client.CreditMemosApi()
request = zuora_client.PostCreditMemoEmailRequestType() # PostCreditMemoEmailRequestType | 
credit_memo_id = 'credit_memo_id_example' # str | The ID of a posted credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172. 
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)

try:
    # Email credit memo
    api_response = api_instance.p_ost_email_credit_memo(request, credit_memo_id, zuora_entity_ids=zuora_entity_ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditMemosApi->p_ost_email_credit_memo: %s\n" % e)

Parameters

Name Type Description Notes
request PostCreditMemoEmailRequestType
credit_memo_id str The ID of a posted credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]

Return type

CommonResponseType

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

p_ost_refund_credit_memo

GETRefundCreditMemoType p_ost_refund_credit_memo(body, creditmemo_id, zuora_entity_ids=zuora_entity_ids)

Refund credit memo

Note: The Invoice Settlement feature is in Limited Availability. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you wish to have access to the feature, submit a request at Zuora Global Support. Refunds a full or partial posted credit memo to your customers. Only the amount of unapplied part could be refunded. You can refund a credit memo only if you have the user permission. See Billing Roles for more information.

Example

from __future__ import print_function
import time
import zuora_client
from zuora_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = zuora_client.CreditMemosApi()
body = zuora_client.PostNonRefRefundType() # PostNonRefRefundType | 
creditmemo_id = 'creditmemo_id_example' # str | The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172. 
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)

try:
    # Refund credit memo
    api_response = api_instance.p_ost_refund_credit_memo(body, creditmemo_id, zuora_entity_ids=zuora_entity_ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditMemosApi->p_ost_refund_credit_memo: %s\n" % e)

Parameters

Name Type Description Notes
body PostNonRefRefundType
creditmemo_id str The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]

Return type

GETRefundCreditMemoType

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

p_ostcm_taxation_items

GETTaxationItemListType p_ostcm_taxation_items(credit_memo_id, body, zuora_entity_ids=zuora_entity_ids)

Create taxation items for credit memo

Note: This feature is only available if you have the Invoice Settlement feature enabled. The Invoice Settlement feature is in Limited Availability. If you wish to have access to the feature, submit a request at Zuora Global Support. Creates taxation items for a credit memo.

Example

from __future__ import print_function
import time
import zuora_client
from zuora_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = zuora_client.CreditMemosApi()
credit_memo_id = 'credit_memo_id_example' # str | The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172. 
body = zuora_client.POSTTaxationItemListForCMType() # POSTTaxationItemListForCMType | 
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)

try:
    # Create taxation items for credit memo
    api_response = api_instance.p_ostcm_taxation_items(credit_memo_id, body, zuora_entity_ids=zuora_entity_ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditMemosApi->p_ostcm_taxation_items: %s\n" % e)

Parameters

Name Type Description Notes
credit_memo_id str The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
body POSTTaxationItemListForCMType
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]

Return type

GETTaxationItemListType

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

p_ut_apply_credit_memo

GETCreditMemoType p_ut_apply_credit_memo(body, credit_memo_id, zuora_entity_ids=zuora_entity_ids)

Apply credit memo

Note: The Invoice Settlement feature is in Limited Availability. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you wish to have access to the feature, submit a request at Zuora Global Support. Applies a posted credit memo to one or more invoices and debit memos. You can apply a credit memo to an invoice or a debit memo only if you have the user permission. See Billing Roles for more information. When applying a credit memo, the total number of invoices and debit memos that the credit memo will apply to must be less than or equal to 1,000. If the Proration application rule is used, when applying credit memos, the following quantity must be less than or equal to 10,000: (number of invoice items + number of debit memo items) * number of credit memo items Otherwise, the First In First Out rule will be used instead of the Proration rule.

Example

from __future__ import print_function
import time
import zuora_client
from zuora_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = zuora_client.CreditMemosApi()
body = zuora_client.ApplyCreditMemoType() # ApplyCreditMemoType | 
credit_memo_id = 'credit_memo_id_example' # str | The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172. 
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)

try:
    # Apply credit memo
    api_response = api_instance.p_ut_apply_credit_memo(body, credit_memo_id, zuora_entity_ids=zuora_entity_ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditMemosApi->p_ut_apply_credit_memo: %s\n" % e)

Parameters

Name Type Description Notes
body ApplyCreditMemoType
credit_memo_id str The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]

Return type

GETCreditMemoType

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

p_ut_cancel_credit_memo

GETCreditMemoType p_ut_cancel_credit_memo(credit_memo_id, zuora_entity_ids=zuora_entity_ids)

Cancel credit memo

Note: The Invoice Settlement feature is in Limited Availability. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you wish to have access to the feature, submit a request at Zuora Global Support. Cancels a credit memo. Only credit memos with the Draft status can be cancelled. You can cancel a credit memo only if you have the user permission. See Billing Roles for more information.

Example

from __future__ import print_function
import time
import zuora_client
from zuora_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = zuora_client.CreditMemosApi()
credit_memo_id = 'credit_memo_id_example' # str | The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172. 
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)

try:
    # Cancel credit memo
    api_response = api_instance.p_ut_cancel_credit_memo(credit_memo_id, zuora_entity_ids=zuora_entity_ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditMemosApi->p_ut_cancel_credit_memo: %s\n" % e)

Parameters

Name Type Description Notes
credit_memo_id str The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]

Return type

GETCreditMemoType

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

p_ut_post_credit_memo

GETCreditMemoType p_ut_post_credit_memo(credit_memo_id, zuora_entity_ids=zuora_entity_ids)

Post credit memo

Note: The Invoice Settlement feature is in Limited Availability. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you wish to have access to the feature, submit a request at Zuora Global Support. Posts a credit memo to activate it. You can post credit memos only if you have the Billing permissions.

Example

from __future__ import print_function
import time
import zuora_client
from zuora_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = zuora_client.CreditMemosApi()
credit_memo_id = 'credit_memo_id_example' # str | The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172. 
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)

try:
    # Post credit memo
    api_response = api_instance.p_ut_post_credit_memo(credit_memo_id, zuora_entity_ids=zuora_entity_ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditMemosApi->p_ut_post_credit_memo: %s\n" % e)

Parameters

Name Type Description Notes
credit_memo_id str The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]

Return type

GETCreditMemoType

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

p_ut_unapply_credit_memo

GETCreditMemoType p_ut_unapply_credit_memo(body, credit_memo_id, zuora_entity_ids=zuora_entity_ids)

Unapply credit memo

Note: The Invoice Settlement feature is in Limited Availability. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you wish to have access to the feature, submit a request at Zuora Global Support. Unapplies an applied credit memo from one or more invoices and debit memos. The full applied amount from invoices and debit memos is transferred into the unapplied amount of the credit memo. You can unapply a credit memo from an invoice or a debit memo only if you have the user permission. See Billing Roles for more information. When unapplying a credit memo, the total number of invoices and debit memos that the credit memo will be unapplied from must be less than or equal to 1,000. If the Proration application rule is used, when unapplying credit memos, the following quantity must be less than or equal to 10,000: (number of invoice items + number of debit memo items) * number of credit memo items Otherwise, the First In First Out rule will be used instead of the Proration rule.

Example

from __future__ import print_function
import time
import zuora_client
from zuora_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = zuora_client.CreditMemosApi()
body = zuora_client.UnapplyCreditMemoType() # UnapplyCreditMemoType | 
credit_memo_id = 'credit_memo_id_example' # str | The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172. 
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)

try:
    # Unapply credit memo
    api_response = api_instance.p_ut_unapply_credit_memo(body, credit_memo_id, zuora_entity_ids=zuora_entity_ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditMemosApi->p_ut_unapply_credit_memo: %s\n" % e)

Parameters

Name Type Description Notes
body UnapplyCreditMemoType
credit_memo_id str The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]

Return type

GETCreditMemoType

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

p_ut_unpost_credit_memo

GETCreditMemoType p_ut_unpost_credit_memo(credit_memo_id, zuora_entity_ids=zuora_entity_ids)

Unpost credit memo

Note: The Invoice Settlement feature is in Limited Availability. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you wish to have access to the feature, submit a request at Zuora Global Support. Unposts a credit memo that is in Posted status. If a credit memo has been applied or refunded, you are not allowed to unpost it. After a credit memo is unposted, its status becomes Draft. You can unpost credit memos only if you have the Billing permissions.

Example

from __future__ import print_function
import time
import zuora_client
from zuora_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = zuora_client.CreditMemosApi()
credit_memo_id = 'credit_memo_id_example' # str | The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172. 
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)

try:
    # Unpost credit memo
    api_response = api_instance.p_ut_unpost_credit_memo(credit_memo_id, zuora_entity_ids=zuora_entity_ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditMemosApi->p_ut_unpost_credit_memo: %s\n" % e)

Parameters

Name Type Description Notes
credit_memo_id str The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]

Return type

GETCreditMemoType

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

p_ut_update_credit_memo

GETCreditMemoType p_ut_update_credit_memo(body, credit_memo_id, zuora_entity_ids=zuora_entity_ids)

Update credit memo

Note: The Invoice Settlement feature is in Limited Availability. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you wish to have access to the feature, submit a request at Zuora Global Support. Updates the basic and finance information about a credit memo. Currently, Zuora supports updating tax-exclusive memo items, but does not support updating tax-inclusive memo items. If the amount of a memo item is updated, the tax will be recalculated in the following conditions: - The memo is created from a product rate plan charge and you use Avalara to calculate the tax. - The memo is created from an invoice and you use Avalara or Zuora Tax to calculate the tax. You can update a credit memo only if you have the user permission. See Billing Roles for more information.

Example

from __future__ import print_function
import time
import zuora_client
from zuora_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = zuora_client.CreditMemosApi()
body = zuora_client.PUTCreditMemoType() # PUTCreditMemoType | 
credit_memo_id = 'credit_memo_id_example' # str | The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.  
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)

try:
    # Update credit memo
    api_response = api_instance.p_ut_update_credit_memo(body, credit_memo_id, zuora_entity_ids=zuora_entity_ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreditMemosApi->p_ut_update_credit_memo: %s\n" % e)

Parameters

Name Type Description Notes
body PUTCreditMemoType
credit_memo_id str The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]

Return type

GETCreditMemoType

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]