{
 "openapi": "3.1.0",
 "info": {
  "title": "Landed Cost Vouchers (Accounting)",
  "version": "20261030b",
  "description": "Freight, duty, insurance and other charges spread onto the goods receipts they belong to. Add the receipts, enter the charges, preview the spread, then post: the share on stock still on hand raises its cost, the share on stock already issued goes to cost of goods sold."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "landed-cost-vouchers": {
    "type": "object",
    "required": [],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "voucher_no": {
      "type": "string",
      "description": "Voucher no",
      "readOnly": true
     },
     "voucher_date": {
      "type": "string",
      "format": "date",
      "description": "Voucher date"
     },
     "voucher_kind": {
      "type": "string",
      "description": "Kind",
      "enum": [
       "actual",
       "estimated"
      ]
     },
     "estimate_voucher_id": {
      "type": "string",
      "format": "uuid",
      "description": "Trues up the estimate"
     },
     "supplier_id": {
      "type": "string",
      "format": "uuid",
      "description": "Billed by (supplier)"
     },
     "carrier_id": {
      "type": "string",
      "format": "uuid",
      "description": "Carrier"
     },
     "currency": {
      "type": "string",
      "description": "Currency"
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "total_charges": {
      "type": "string",
      "format": "decimal",
      "description": "Total charges",
      "readOnly": true
     },
     "to_inventory": {
      "type": "string",
      "format": "decimal",
      "description": "To inventory",
      "readOnly": true
     },
     "to_cogs": {
      "type": "string",
      "format": "decimal",
      "description": "To cogs",
      "readOnly": true
     },
     "to_expense": {
      "type": "string",
      "format": "decimal",
      "description": "To expense",
      "readOnly": true
     },
     "accrual_released": {
      "type": "string",
      "format": "decimal",
      "description": "Accrual released",
      "readOnly": true
     },
     "journal_id": {
      "type": "string",
      "format": "uuid",
      "description": "Journal id",
      "readOnly": true
     },
     "reversal_journal_id": {
      "type": "string",
      "format": "uuid",
      "description": "Reversal journal id",
      "readOnly": true
     },
     "posted_at": {
      "type": "string",
      "format": "date-time",
      "description": "Posted at",
      "readOnly": true
     },
     "posted_by": {
      "type": "string",
      "format": "uuid",
      "description": "Posted by",
      "readOnly": true
     },
     "reversed_at": {
      "type": "string",
      "format": "date-time",
      "description": "Reversed at",
      "readOnly": true
     },
     "reversal_reason": {
      "type": "string",
      "description": "Reversal reason",
      "readOnly": true
     },
     "notes": {
      "type": "string",
      "description": "Notes"
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "created_by": {
      "type": "string",
      "format": "uuid",
      "description": "Created by",
      "readOnly": true
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Updated at",
      "readOnly": true
     },
     "updated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Updated by",
      "readOnly": true
     },
     "estimated_receipt_id": {
      "type": "string",
      "format": "uuid",
      "description": "Estimated receipt id",
      "readOnly": true
     },
     "xf_text_1": {
      "type": "string",
      "description": "Xf text 1",
      "readOnly": true
     },
     "xf_text_2": {
      "type": "string",
      "description": "Xf text 2",
      "readOnly": true
     },
     "xf_text_3": {
      "type": "string",
      "description": "Xf text 3",
      "readOnly": true
     },
     "xf_text_4": {
      "type": "string",
      "description": "Xf text 4",
      "readOnly": true
     },
     "xf_text_5": {
      "type": "string",
      "description": "Xf text 5",
      "readOnly": true
     },
     "xf_num_1": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 1",
      "readOnly": true
     },
     "xf_num_2": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 2",
      "readOnly": true
     },
     "xf_num_3": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 3",
      "readOnly": true
     },
     "xf_date_1": {
      "type": "string",
      "format": "date",
      "description": "Xf date 1",
      "readOnly": true
     },
     "xf_date_2": {
      "type": "string",
      "format": "date",
      "description": "Xf date 2",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/accounting/landed-cost-vouchers": {
   "get": {
    "summary": "list landed-cost-vouchers",
    "operationId": "list_landed_cost_vouchers_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create landed-cost-vouchers",
    "operationId": "create_landed_cost_vouchers_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/landed-cost-vouchers/{id}": {
   "get": {
    "summary": "get landed-cost-vouchers",
    "operationId": "get_landed_cost_vouchers_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change landed-cost-vouchers",
    "operationId": "change_landed_cost_vouchers_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete landed-cost-vouchers",
    "operationId": "delete_landed_cost_vouchers_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/landed-cost-vouchers/estimate": {
   "post": {
    "summary": "Estimate",
    "operationId": "action_landed_cost_vouchers_0_5",
    "description": "Body keys: receiptId*, receipt_id, post",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/landed-cost-vouchers/{id}/add-receipt": {
   "post": {
    "summary": "Add receipt",
    "operationId": "action_landed_cost_vouchers_0_6",
    "description": "Body keys: receiptId*, receipt_id",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/landed-cost-vouchers/{id}/preview": {
   "post": {
    "summary": "Preview",
    "operationId": "action_landed_cost_vouchers_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/landed-cost-vouchers/{id}/post": {
   "post": {
    "summary": "Post",
    "operationId": "action_landed_cost_vouchers_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/landed-cost-vouchers/{id}/reverse": {
   "post": {
    "summary": "Reverse",
    "operationId": "action_landed_cost_vouchers_0_6",
    "description": "Body keys: reason, date",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/landed-cost-vouchers/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_landed_cost_vouchers_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/landed-cost-vouchers/{parentId}/targets": {
   "get": {
    "summary": "Targets",
    "operationId": "action_landed_cost_vouchers_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Targets",
    "operationId": "action_landed_cost_vouchers_1_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/landed-cost-vouchers/{parentId}/targets/{lineId}": {
   "put": {
    "summary": "Targets",
    "operationId": "action_landed_cost_vouchers_0_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Targets",
    "operationId": "action_landed_cost_vouchers_1_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/landed-cost-vouchers/{parentId}/charges": {
   "get": {
    "summary": "Charges",
    "operationId": "action_landed_cost_vouchers_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Charges",
    "operationId": "action_landed_cost_vouchers_1_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/landed-cost-vouchers/{parentId}/charges/{lineId}": {
   "put": {
    "summary": "Charges",
    "operationId": "action_landed_cost_vouchers_0_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Charges",
    "operationId": "action_landed_cost_vouchers_1_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/landed-cost-vouchers/{parentId}/allocation": {
   "get": {
    "summary": "Allocation",
    "operationId": "action_landed_cost_vouchers_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Allocation",
    "operationId": "action_landed_cost_vouchers_1_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/accounting/landed-cost-vouchers/{parentId}/allocation/{lineId}": {
   "put": {
    "summary": "Allocation",
    "operationId": "action_landed_cost_vouchers_0_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Allocation",
    "operationId": "action_landed_cost_vouchers_1_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}