# Regenerate journal

## Regenerates a journal.

> Re-processes the journal charges, recalculating derived values and re-validating data.

```json
{"openapi":"3.0.1","info":{"title":"Marketplace API","version":"5.0.5353-g6bbacdcd"},"servers":[{"url":"https://api.platform.softwareone.com"}],"paths":{"/public/v1/billing/journals/{id}/regenerate":{"post":{"tags":["Journals"],"summary":"Regenerates a journal.","description":"Re-processes the journal charges, recalculating derived values and re-validating data.","parameters":[{"name":"id","in":"path","description":"The ID of the journal to regenerate.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The journal data to be updated before action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Journal"}},"text/json":{"schema":{"$ref":"#/components/schemas/Journal"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Journal"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Journal"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"Journal":{"type":"object","properties":{"audit":{"allOf":[{"$ref":"#/components/schemas/JournalAuditBag"}],"description":"Represents a container for audit-related events for a journal"},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"revision":{"type":"integer","format":"int32"},"id":{"type":"string","description":"The unique identifier of the journal entry."},"name":{"type":"string","description":"Name of the journal."},"description":{"type":"string","description":"A description of the journal entry."},"externalIds":{"allOf":[{"$ref":"#/components/schemas/BillingExternalIds"}],"description":"External identifiers associated with the journal entry."},"notes":{"type":"string","description":"Additional notes or comments about the journal entry.","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/JournalStatus"}],"description":"The current status of the journal entry."},"vendor":{"type":"object","allOf":[{"$ref":"#/components/schemas/AccountRef"}]},"owner":{"type":"object","allOf":[{"$ref":"#/components/schemas/SellerRef"}]},"product":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProductRef"}]},"authorization":{"allOf":[{"$ref":"#/components/schemas/Authorization"}],"description":"Authorization details associated with the journal entry."},"dueDate":{"type":"string","description":"The due date for the journal entry.","format":"date-time"},"assignee":{"type":"object","allOf":[{"$ref":"#/components/schemas/PlatformIdentityRef"}]},"price":{"allOf":[{"$ref":"#/components/schemas/JournalPriceSummary"}],"description":"Pricing details associated with the journal entry."},"upload":{"allOf":[{"$ref":"#/components/schemas/JournalUploadSummary"}],"description":"Upload summary details for the journal entry, visible to vendors or operations."},"processing":{"allOf":[{"$ref":"#/components/schemas/ProcessingSummary"}],"description":"Processing status and related details for the journal entry, visible to operations."},"error":{"allOf":[{"$ref":"#/components/schemas/BillingError"}],"description":"Error details associated with the journal entry, if any.","nullable":true},"backup":{"allOf":[{"$ref":"#/components/schemas/BackupDetails"}],"description":"Backup details for the journal."}},"additionalProperties":false,"description":"Represents a journal entry in the billing system."},"JournalAuditBag":{"type":"object","properties":{"created":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"updated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"draft":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the journal reached the \"Draft\" status.","nullable":true},"deleted":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the journal reached the \"Deleted\" status.","nullable":true},"error":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the journal reached the \"Error\" status.","nullable":true},"validating":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the journal reached the \"Validating\" status.","nullable":true},"validated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the journal reached the \"Validated\" status.","nullable":true},"review":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the journal reached the \"Review\" status.","nullable":true},"enquiring":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the journal reached the \"Enquiring\" status.","nullable":true},"generating":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the journal reached the \"Generating\" status.","nullable":true},"generated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the journal reached the \"Generated\" status.","nullable":true},"accepted":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the journal reached the \"Accepted\" status.","nullable":true},"completed":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Contains details about the most recent event when the journal reached the \"Completed\" status.","nullable":true}},"additionalProperties":false,"description":"Represents a container for audit-related events for a journal"},"PlatformObjectEvent":{"type":"object","properties":{"at":{"type":"string","format":"date-time","nullable":true},"by":{"type":"object","allOf":[{"$ref":"#/components/schemas/PlatformIdentityRef"}]}},"additionalProperties":false},"PlatformIdentityRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"}},"additionalProperties":false},"PlatformMetadata":{"type":"object","properties":{"omitted":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"BillingExternalIds":{"type":"object","properties":{"operations":{"type":"string","description":"Represents the identifier used for operations in the billing system.","nullable":true},"vendor":{"type":"string","description":"Represents the identifier used for vendors in the billing system.","nullable":true}},"additionalProperties":false,"description":"Represents external identifiers associated with billing entities."},"JournalStatus":{"enum":["Draft","Deleted","Error","Validating","Validated","Review","Reconciling","Enquiring","Generating","Generated","Accepted","Queued","Completed","Resetting"],"type":"string","description":"Represents the various statuses a journal can have in the billing system."},"AccountRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"type":{"allOf":[{"$ref":"#/components/schemas/AccountType"}],"nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/AccountStatus"}],"nullable":true}},"additionalProperties":false},"AccountType":{"enum":["Client","Vendor","Operations"],"type":"string"},"AccountStatus":{"enum":["Active","Enabled","Disabled"],"type":"string"},"SellerRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"externalId":{"type":"string","nullable":true}},"additionalProperties":false},"ProductRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"externalIds":{"allOf":[{"$ref":"#/components/schemas/ProductExternalIdBag"}]},"status":{"type":"string"}},"additionalProperties":false},"ProductExternalIdBag":{"type":"object","properties":{"operations":{"type":"string","nullable":true},"defaultErpItem":{"type":"string","nullable":true}},"additionalProperties":false},"Authorization":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectAudit"}]},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"name":{"type":"string"},"revision":{"type":"integer","format":"int32"},"externalIds":{"allOf":[{"$ref":"#/components/schemas/AuthorizationExternalIdBag"}]},"currency":{"type":"string"},"notes":{"type":"string","nullable":true},"product":{"allOf":[{"$ref":"#/components/schemas/Product"}]},"vendor":{"allOf":[{"$ref":"#/components/schemas/Account"}]},"owner":{"allOf":[{"$ref":"#/components/schemas/Seller"}]},"statistics":{"allOf":[{"$ref":"#/components/schemas/AuthorizationStatistics"}]},"journal":{"allOf":[{"$ref":"#/components/schemas/AuthorizationJournal"}]},"eligibility":{"allOf":[{"$ref":"#/components/schemas/AuthorizationEligibility"}]},"settings":{"type":"string","nullable":true}},"additionalProperties":false},"PlatformObjectAudit":{"type":"object","properties":{"created":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"updated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true}},"additionalProperties":false},"AuthorizationExternalIdBag":{"type":"object","properties":{"operations":{"type":"string","nullable":true}},"additionalProperties":false},"Product":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/ProductAudit"}]},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"shortDescription":{"type":"string","nullable":true},"longDescription":{"type":"string","nullable":true},"externalIds":{"allOf":[{"$ref":"#/components/schemas/ProductExternalIdBag"}]},"website":{"type":"string"},"status":{"type":"string"},"vendor":{"type":"object","allOf":[{"$ref":"#/components/schemas/AccountRef"}]},"settings":{"allOf":[{"$ref":"#/components/schemas/ProductSettings"}]},"statistics":{"allOf":[{"$ref":"#/components/schemas/ProductStatistics"}]}},"additionalProperties":false},"ProductAudit":{"type":"object","properties":{"created":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"updated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"published":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"pending":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"unpublished":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true}},"additionalProperties":false},"ProductSettings":{"type":"object","properties":{"productOrdering":{"type":"boolean"},"productRequests":{"allOf":[{"$ref":"#/components/schemas/ProductRequestsSetting"}]},"itemSelection":{"type":"boolean"},"orderQueueChanges":{"type":"boolean"},"preValidation":{"allOf":[{"$ref":"#/components/schemas/PreValidationSettings"}]},"splitBilling":{"allOf":[{"$ref":"#/components/schemas/ProductSplitBillingRequestsSetting"}]},"sendCostToErp":{"type":"boolean","nullable":true},"subscriptionCessation":{"allOf":[{"$ref":"#/components/schemas/SubscriptionCessationSetting"}]}},"additionalProperties":false},"ProductRequestsSetting":{"type":"object","properties":{"enabled":{"type":"boolean"},"name":{"type":"string","nullable":true},"label":{"type":"string","nullable":true}},"additionalProperties":false},"PreValidationSettings":{"type":"object","properties":{"purchaseOrderDraft":{"type":"boolean"},"purchaseOrderQuerying":{"type":"boolean"},"changeOrderDraft":{"type":"boolean"},"configurationOrderDraft":{"type":"boolean"},"terminationOrder":{"type":"boolean"}},"additionalProperties":false},"ProductSplitBillingRequestsSetting":{"type":"object","properties":{"enabled":{"type":"boolean"},"type":{"type":"string","nullable":true}},"additionalProperties":false},"SubscriptionCessationSetting":{"type":"object","properties":{"enabled":{"type":"boolean"},"mode":{"enum":["Termination","Auto-renewal","Termination or auto-renewal"],"type":"string","nullable":true}},"additionalProperties":false},"ProductStatistics":{"type":"object","properties":{"itemCount":{"type":"integer","format":"int32"},"ordersPlacedCount":{"type":"integer","format":"int32"},"agreementCount":{"type":"integer","format":"int32"},"subscriptionCount":{"type":"integer","format":"int32"}},"additionalProperties":false},"Account":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectAudit"}]},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"type":{"allOf":[{"$ref":"#/components/schemas/AccountType"}],"nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/AccountStatus"}],"nullable":true},"externalIds":{"allOf":[{"$ref":"#/components/schemas/AccountExternalIds"}],"nullable":true},"externalId":{"type":"string","nullable":true},"externalName":{"type":"string","nullable":true},"address":{"allOf":[{"$ref":"#/components/schemas/Address"}]},"technicalSupportEmail":{"type":"string","nullable":true},"website":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"groups":{"type":"array","items":{"$ref":"#/components/schemas/UserGroupRef"},"nullable":true},"eligibility":{"allOf":[{"$ref":"#/components/schemas/Eligibility"}],"nullable":true},"defaultLanguageCode":{"type":"string","nullable":true}},"additionalProperties":false},"AccountExternalIds":{"type":"object","properties":{"pyraTenantId":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false},"Address":{"type":"object","properties":{"addressLine1":{"type":"string","nullable":true},"addressLine2":{"type":"string","nullable":true},"postCode":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"country":{"type":"string","nullable":true}},"additionalProperties":false},"UserGroupRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer","format":"int32"},"description":{"type":"string","nullable":true},"logo":{"type":"string","nullable":true},"isDefault":{"type":"boolean"}},"additionalProperties":false},"Eligibility":{"type":"object","properties":{"client":{"type":"boolean"},"partner":{"type":"boolean"}},"additionalProperties":false},"Seller":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectAudit"}]},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"externalId":{"type":"string","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/SellerStatus"}],"nullable":true},"currencies":{"type":"array","items":{"$ref":"#/components/schemas/SellerCurrency"},"nullable":true},"address":{"allOf":[{"$ref":"#/components/schemas/Address"}]},"erpLink":{"type":"object","allOf":[{"$ref":"#/components/schemas/ErpLinkRef"}]}},"additionalProperties":false},"SellerStatus":{"enum":["Active","Disabled","Offline","Deleted"],"type":"string"},"SellerCurrency":{"type":"object","properties":{"value":{"type":"string"},"billingEnabled":{"type":"boolean"},"isDefault":{"type":"boolean"}},"additionalProperties":false},"ErpLinkRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"companyName":{"type":"string","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/ErpLinkStatus"}]}},"additionalProperties":false},"ErpLinkStatus":{"enum":["Active","Blocked"],"type":"string"},"AuthorizationStatistics":{"type":"object","properties":{"subscriptions":{"type":"integer","format":"int32"},"agreements":{"type":"integer","format":"int32"},"sellers":{"type":"integer","format":"int32"},"listings":{"type":"integer","format":"int32"}},"additionalProperties":false},"AuthorizationJournal":{"type":"object","properties":{"firstInvoiceDate":{"type":"string","format":"date-time"},"frequency":{"enum":["1m","6m","1y","3m","3y","one-time"],"type":"string"}},"additionalProperties":false},"AuthorizationEligibility":{"type":"object","properties":{"client":{"type":"boolean"},"partner":{"type":"boolean"}},"additionalProperties":false},"JournalPriceSummary":{"type":"object","properties":{"markup":{"type":"number","description":"Represents the markup value applied to the pricing.","format":"double"},"margin":{"type":"number","description":"Represents the margin value calculated for the pricing.","format":"double"},"totalPP":{"type":"number","description":"Represents the total purchase price.","format":"double"},"totalBSP":{"type":"number","description":"Represents the total sale price in buyer currency.","format":"double"},"currency":{"type":"string","description":"Specifies the currency for the pricing."}},"additionalProperties":false,"description":"Represents a detailed summary of pricing."},"JournalUploadSummary":{"type":"object","properties":{"total":{"type":"integer","description":"The total number of items in the upload.","format":"int32"},"split":{"type":"integer","description":"The number of items that were split during the upload.","format":"int32"},"ready":{"type":"integer","description":"The number of items that are ready for processing.","format":"int32"},"error":{"type":"integer","description":"The number of items that encountered errors during the upload.","format":"int32"}},"additionalProperties":false,"description":"Represents a summary of the upload status for a journal entry."},"ProcessingSummary":{"type":"object","properties":{"total":{"type":"integer","description":"Indicates the total number of items involved in the processing.","format":"int32"},"ready":{"type":"integer","description":"Indicates the number of items that are ready for further processing.","format":"int32"},"error":{"type":"integer","description":"Indicates the number of items that encountered errors during processing.","format":"int32"},"split":{"type":"integer","description":"Indicates the number of items that were split into multiple parts during processing.","format":"int32"},"skipped":{"type":"integer","description":"Indicates the number of items that were skipped during processing.","format":"int32"},"ignored":{"type":"integer","description":"Indicates the number of items that were manually ignored.","format":"int32"}},"additionalProperties":false,"description":"Represents a summary of the processing status for various billing operations."},"BillingError":{"type":"object","properties":{"errorCode":{"type":"string","description":"Represents the error code associated with the billing entity."},"errorMessage":{"type":"string","description":"Represents the error message providing details about the issue."},"id":{"type":"string","description":"Represents the unique identifier for the error, if applicable.","nullable":true},"message":{"type":"string","description":"Represents the detailed message associated with the error, if applicable.","nullable":true}},"additionalProperties":false,"description":"Represents an error related to a billing entity."},"BackupDetails":{"type":"object","properties":{"status":{"allOf":[{"$ref":"#/components/schemas/BackupStatus"}],"description":"Status of the backup."},"date":{"type":"string","description":"Date and time of the backup action, if available.","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Represents the details of a backup operation, including its status and date."},"BackupStatus":{"enum":["Pending","Exporting","Exported","Verifying","Completed","Failed","Skipped"],"type":"string","description":"Represents the status of a backup operation."},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.platform.softwareone.com/developer-resources/rest-api/billing-api/journal/regenerate-journal.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
