Payments & Vouchers

Ledger Line Postings

A LedgerLinePosting contains a group of balanced LedgerLine's that Trybe can send to other systems. The LedgerLinePosting ensures accurate recording of financial transactions and enables you to monitor the successful postings for data integrity.

The LedgerLinePosting object

Attributes

  • idobject-idrequired

    The ID of this ledger line posting.

  • site_iduuidrequired

    The ID of the site this ledger line posting belongs to.

  • created_atdate-timerequired

    The date and time the ledger posting was created.

  • integrationstringrequired

    An identifier for the integration the posting was for.

  • integration_namestringrequired

    A user-friendly name for the integration.

  • integration_is_asyncbooleanoptional

    Whether the integration works asynchronously.

  • statusstringrequired

    The status of the posting.

    Possible values:successresolvederrorin_progressnot_startednothing_to_post
  • payableobjectrequired

    A summary of the model that the ledger line or posting relates to, usually a basket.

  • causerobjectrequired

    A summary of the model that caused the posting or line to be generated.

  • last_errorstringoptional

    The last error encountered when attempting to post this record.

  • last_error_atdate-timeoptional

    The date and time of the last error.

  • succeeded_atdate-timeoptional

    The date and time the posting succeeded.

  • linesobject[]required
{
  "id": "64a9f3b2c3d8e1f4a5b6c7d8",
  "site_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2023-05-05T11:38:29+01:00",
  "integration": "guestline_rezlynx",
  "integration_name": "Guestline",
  "integration_is_async": false,
  "status": "success",
  "payable": {
    "id": "64a9f3b2c3d8e1f4a5b6c7d8",
    "type": "basket",
    "reference": "TRY00",
    "description": "dan@example.com"
  },
  "causer": {
    "id": "64a9f3b2c3d8e1f4a5b6c7d8",
    "type": "basket",
    "reference": "TRY00"
  },
  "last_error": "string",
  "last_error_at": "2023-05-05T11:39:21+01:00",
  "succeeded_at": "2023-05-05T11:39:21+01:00",
  "lines": [
    "string"
  ]
}
get/shop/ledger-line-postings

List LedgerLinePostings

listLedgerLinePostings

Use this endpoint to retrieve a list of LedgerLinePosting resources associated with a Site.

Query parameters

  • site_iduuidoptional

    Filter the list of LedgerLinePostings by site

  • statusstringoptional

    Filter the list of LedgerLinePostings by status

    Possible values:successresolvederrorin_progressnot_started
  • sortstringoptional

    Sort the list by the given column name

  • sort_directionstringoptional

    The direction to sort the results in.

    Possible values:ascdesc
  • pageintegeroptional

    The page to retrieve results from

  • created_at_fromdateoptional

    Filter the list of LedgerLinePostings by created at from. This will include the given date.

  • created_at_todateoptional

    Filter the list of LedgerLinePostings by created at to. This will filter up to and including the given date.

  • succeeded_at_fromdateoptional

    Filter the list of LedgerLinePostings by succeeded at from. This will include the given date.

  • succeeded_at_todateoptional

    Filter the list of LedgerLinePostings by succeeded at to. This will filter up to and including the given date.

Responses

  • 200

    The list of LedgerLinePostings resources was successfully retrieved

  • 401

    The user is unauthenticated

get/shop/ledger-line-postings/{ledgerLinePostingId}

Show a LedgerLinePosting

getLedgerLinePosting

Use this endpoint to retrieve a LedgerLinePosting.

Path parameters

Responses

  • 200

    The LedgerLinePosting was successfully retrieved

  • 401

    The user is unauthenticated

  • 404

    The resource couldn't be found

put/shop/ledger-line-postings/{ledgerLinePostingId}

Update a LedgerLinePosting

updateLedgerLinePosting

Use this endpoint to update the status of a LedgerLinePosting.

Path parameters

Request body

  • statusstringrequired

    The status of the LedgerLinePosting

    Possible values:successresolved

Responses

  • 200

    The LedgerLinePosting was successfully updated

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

  • 422

    The request didn't pass validation

post/shop/ledger-line-postings/{ledgerLinePostingId}/retry

Retry a LedgerLinePosting

actionRetryLedgerLinePosting

Use this endpoint to retry a LedgerLinePosting that has failed.

Path parameters

Responses

  • 200

    The request to retry a LedgerLinePosting was received

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

post/shop/ledger-line-postings/{ledgerLinePostingId}/reverse

Reverse a LedgerLinePosting

actionReverseLedgerLinePosting

Use this endpoint to reverse a LedgerLinePosting. This action does not automatically attempt to post the new LedgerLinePosting to any integrations.

Path parameters

Responses

  • 200

    The request to reverse a LedgerLinePosting was received

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found