Knowledge Center

Knowledge Center > API > REST API > REST API Reference > Summary Journal Entries > Create Summary Journal Entry

Create Summary Journal Entry

Overview

This REST API reference describes how to manually create a summary journal entry. Request and response field descriptions and sample code are provided.

Requirements

  1. The sum of debits must equal the sum of credits in the summary journal entry.
  2. The following applies only if you use foreign currency conversion:
    • If you have configured Aggregate transactions with different currencies during a Journal Run to "Yes", the value of the currency field must be the same as your tenant's home currency. That is, you must create journal entries using your home currency.
    • All journal entries in an accounting period must either all be aggregated or all be unaggregated. You cannot have a mix of aggregated and unaggregated journal entries in the same accounting period.

See Foreign Currency Conversion for Summary Journal Entries for more information about currency aggregation.

Request

  • Production: POST https://api.zuora.com/rest/v1/journal-entries
  • API Sandbox: POST https://apisandbox-api.zuora.com/rest/v1/journal-entries

Request Header

The Accept request header is optional. Only JSON is returned.

Request Body

notes

optional

The number associated with the revenue event.

Character limit: 2,000

journalEntryDate

required

Date of the journal entry.

accountingPeriodName

required

Name of the accounting period. The open-ended accounting period is named Open-Ended

transferredToAccounting

optional

Status shows whether the journal entry has been transferred to an accounting system. The possible values are No, Processing, Yes, Error, Ignore.

currency

required

The type of currency used. 

Currency must be active in Billing Settings > Customize Currencies.

cf_txtn__c

optional

One or more optional custom fields, where n is the maximum number of custom fields allowed.

cf_pkn__c

optional

One or more optional custom fields, where n is the maximum number of custom fields allowed. 

segments

conditional

List of segments that apply to the summary journal entry.

Segments must match the segments in the GL segmentation rule and must be in the same order.

This field is required if the GL segmentation rule is configured.

segmentName

required

​Name of segment.

segmentValue

required

​Value of segment in this summary journal entry.

journalEntryItems

required

Key name that represents the list of journal entry items.

accountingCodeType

conditional

Accounting code type. The accounting code types are:

  • AccountsReceivable
  • Cash
  • OtherAssets
  • CustomerCashOnAccount 
  • DeferredRevenue
  • SalesTaxPayable
  • OtherLiabilities
  • SalesRevenue 
  • SalesDiscounts
  • OtherRevenue
  • OtherEquity
  • BadDebt  
  • OtherExpenses

This field is required if accountingCodeName is not unique.

accountingCodeName

required

Name of the accounting code.

type

required

Type of journal entry item. An enum with the value Credit or Debit.

amount

required

Journal entry item amount in transaction currency.

homeCurrencyAmount

conditional

Journal entry item amount in home currency.

This field is required if you have set your home currency for foreign currency conversion. Otherwise, do not pass this field.

cf_txtn__c

optional

One or more optional custom fields, where n is the maximum number of custom fields allowed.

cf_pkn__c

optional

One or more optional custom fields, where n is the maximum number of custom fields allowed. 

Response

success

Returns true if the request is successful. Otherwise, returns false.

processId

The internal process ID used to assist Zuora support. Returned only if success is false.

reasons

Information describing the reason for the result. Returned only if success is false.

code

An eight-digit numeric error code.

message

A description of the error.

journalEntryNumber

Journal entry number in the format JE-00000001.

 

JSON Example

HTTP/JSON Request:

POST https://api.zuora.com/rest/v1/journal-entries
{
"notes":"my account",
"journalEntryDate":"2014-09-09",
"accountingPeriodName":"Nov-2014",
"transferredToAccounting":"No",
"currency":"USD",
"cf_txt1__c":"1000001",
"cf_txt2__c":"2014-11-01",
"cf_pk1__c":"CreditCard",
"cf_pk2__c":"John Smith",
"segments":[
       {  "segmentName":"billToCountry",
          "segmentValue":"United States"},
       {  "segmentName":"billToState",
          "segmentValue":"California"}
 ],
 "journalEntryItems":[
         {  "accountingCodeType":"Deferred Revenue",
            "accountingCodeName":"Accounts Receivable", 
             "type":"Credit",
             "amount":"400.9",
             "homeCurrencyAmount":"801.8"},
         {  "accountingCodeType":"Sales Revenue",
            "accountingCodeName":"Subscription Revenue", 
             "type":"Debit",
             "amount":"400.9",
             "homeCurrencyAmount":"801.8"}
        ]
}

JSON Response:

{
"success":true,
"journalEntryNumber":"JE-00000001"
}
Last modified
23:56, 16 Jan 2017

Tags

This page has no custom tags.

Classifications

(not set)