Create a journal record

Creates a journal record.

SecuritySecretApiKey or JWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

ID of the resource.

Request Body schema: application/json

Journal record resource.

customerId
required
string <= 50 characters

ID of the customer.

invoiceId
required
string

ID of the invoice.

invoiceItemId
required
string

ID of the invoice item.

debitAccountId
required
string or null

ID of the debit journal account.

creditAccountId
required
string or null

ID of the credit journal account.

id
string (ResourceId) <= 50 characters

Unique resource ID. Defaults to UUID v4.

estimatedAmount
number or null <double>

Amount of revenue estimated to be recognized at the schedule date. This value is ignored when updating a journal record with a type of automated.

recognizedAmount
number or null <double>

Amount of revenue recognized at the journal period end.

Responses
201

Journal record created.

Response Headers
Location
string <uri>

Location of the related resource.

Example: "https://api.rebilly.com/example"
Response Schema: application/json
type
required
string
Enum: "automated" "manual"
journalEntryId
required
string

ID of the journal entry.

customerId
required
string <= 50 characters

ID of the customer.

invoiceId
required
string

ID of the invoice.

invoiceItemId
required
string

ID of the invoice item.

debitAccountId
required
string or null

ID of the debit journal account.

creditAccountId
required
string or null

ID of the credit journal account.

id
string (ResourceId) <= 50 characters

Unique resource ID. Defaults to UUID v4.

estimatedAmount
number or null <double>

Amount of revenue estimated to be recognized at the schedule date. This value is ignored when updating a journal record with a type of automated.

recognizedAmount
number or null <double>

Amount of revenue recognized at the journal period end.

createdTime
string <date-time> (CreatedTime)

Date and time which is set automatically when the resource is created.

updatedTime
string <date-time> (UpdatedTime)

Date and time which updates automatically when the resource is updated.

object

Embedded objects that are requested by the expand query parameter.

customer
object
invoice
object
invoiceItem
object
debitAccount
object
creditAccount
object
Array of objects

Related links.

Array
href
string

Link URL.

rel
string

Type of link.

Enum: "self" "customer" "invoice" "invoiceItem" "journalEntry" "creditAccount" "debitAccount"
401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

422

Invalid data sent.

post/journal-entries/{id}/records
Request samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF",
  • "invoiceId": "string",
  • "invoiceItemId": "string",
  • "estimatedAmount": 0,
  • "recognizedAmount": 0,
  • "debitAccountId": "string",
  • "creditAccountId": "string"
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "journalEntryId": "string",
  • "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF",
  • "invoiceId": "string",
  • "invoiceItemId": "string",
  • "type": "automated",
  • "estimatedAmount": 0,
  • "recognizedAmount": 0,
  • "debitAccountId": "string",
  • "creditAccountId": "string",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "_embedded": {
    },
  • "_links": [
    ]
}