Daftra API
DocsAll EndpointsDaftra Partners
DocsAll EndpointsDaftra Partners
  1. Credit Notes
  • Welcome
  • Getting Started
  • Authorization
  • Validation Errors
  • API v1 Endpoints
    • Auth
      • Generate Access Token
    • Invoices
      • GET All Invoices
      • GET Single Invoice
      • Edit Invoices
      • Delete Invoices
      • Add New Invoice
    • Estimates
      • GET All Estimates
      • GET Single Estimate
      • Edit Estimates
      • Delete Estimates
      • Add New Estimate
    • Credit Notes
      • GET All Credit Notes
        GET
      • GET Single Credit Note
        GET
      • Edit Credit Notes
        PUT
      • Delete Credit Notes
        DELETE
      • Add New Credit Note
        POST
    • Refund Receipts
      • GET All Refund Receipts
      • GET Single Refund Receipt
      • Edit Refund Receipts
      • Delete Refund Receipts
      • Add New Refund Receipt
    • Clients
      • GET All Clients
      • GET Single Client
      • Edit Clients
      • Delete Clients
      • Add New Client
    • Suppliers
      • GET All Suppliers
      • GET Single Supplier
      • Edit Suppliers
      • Delete Suppliers
      • Add New Supplier
    • Work Orders
      • GET Single Work Order
      • Edit Work Orders
      • Delete Work Orders
      • GET All Work Orders
      • Add New Work Order
    • Client Appointments
      • GET All Client Appointments
      • GET Single Client Appointment
      • Edit Client Appointments
      • Delete Client Appointments
      • Add New Client Appointment
    • Invoice Appointments
      • GET All Invoice Appointments
      • GET Single Invoice Appointment
      • Edit Invoice Appointments
      • Delete Invoice Appointments
      • Add New Invoice Appointment
    • Estimate Appointments
      • GET All Estimate Appointments
      • GET Single Estimate Appointment
      • Edit Estimate Appointments
      • Delete Estimate Appointments
      • Add New Estimate Appointment
    • Work Order Appointments
      • GET All Work Order Appointments
      • GET Single Work Order Appointment
      • Edit Work Order Appointments
      • Delete Work Order Appointments
      • Add New Work Order Appointment
    • Notes
      • GET All Notes
      • GET Single Note
      • Edit Notes
      • Delete Notes
      • Add New Note
    • Time Tracking
      • GET All Time Tracking
      • GET Single Time Tracking
      • Edit Time Tracking
      • Delete Time Tracking
      • Add New Time Tracking
    • Invoice Payments
      • GET All Invoice Payments
      • GET Single Invoice Payment
      • Edit Invoice Payments
      • Delete Invoice Payments
      • Add New Invoice Payment
    • Client Payments
      • GET All Client Payments
      • GET Single Client Payment
      • Edit Client Payments
      • Delete Client Payments
      • Add New Client Payment
    • Products
      • GET All Products
      • GET Single Product
      • Edit Products
      • Delete Products
      • Add New Product
    • Journals
      • GET All Journals
      • GET Single Journal
      • Edit Journals
      • Delete Journals
      • Add New Journal
    • Journal Accounts
      • GET All Journal Accounts
      • GET Single Journal Account
      • Edit Journal Accounts
      • Delete Journal Accounts
      • Add New Journal Account
    • Journal Cats
      • GET All Journal Cats
      • GET Single Journal Cat
      • Edit Journal Cats
      • Delete Journal Cats
      • Add New Journal Cat
    • Expenses
      • GET All Expenses
      • GET Single Expens
      • Edit Expenses
      • Delete Expenses
      • Add New Expens
    • Incomes
      • GET All Incomes
      • GET Single Income
      • Edit Incomes
      • Delete Incomes
      • Add New Income
    • Taxes
      • GET All Taxes
      • GET Single Taxe
      • Edit Taxes
      • Delete Taxes
      • Add New Taxe
    • Purchase Invoices
      • GET All Purchase Invoices
      • GET Single Purchase Invoice
      • Edit Purchase Invoices
      • Delete Purchase Invoices
      • Add New Purchase Invoice
    • Purchase Refunds
      • GET All Purchase Refunds
      • GET Single Purchase Refund
      • Edit Purchase Refunds
      • Delete Purchase Refunds
      • Add New Purchase Refund
    • Stock Transactions
      • GET All Stock Transactions
      • GET Single Stock Transaction
      • Edit Stock Transactions
      • Delete Stock Transactions
      • Add New Stock Transaction
    • Stores
      • GET All Stores
      • GET Single Store
      • Edit Stores
      • Delete Stores
      • Add New Store
    • Treasuries
      • GET All Treasuries
      • GET Single Treasury
      • Edit Treasuries
      • Delete Treasuries
      • Add New Treasury
    • Product Categories
      • GET All Product Categories
      • GET Single Product Category
    • Staff
      • GET All Staff
      • GET Single Staff
    • Client-attendance-log
      • Add New Client-attendance-log
    • Follow Up Actions
      • GET All Follow Up Actions
      • GET Single Follow Up Action
      • Delete Follow Up Action
    • Follow Up Statuses
      • GET All Follow Up Statuses
      • GET Single Follow Up Status
      • Delete Follow Up Status
    • General Listing
      • GET General Listing
    • Site
      • GET Site Info
    • Requsitions
      • GET All Requisitions
      • GET single Requisition
      • Edit Requisitions
      • Delete Requisitions
      • Add New Requisition
    • Purchase Debit Note
      • Purchase Debit Note
      • Purchase Debit Note
    • Product Bundles
      • Add Product bundle
  • API v2 Endpoints
    • API v2
    • Filtering
    • How to Use v2
    • API v2
  1. Credit Notes

Add New Credit Note

Production
https://{{subdomain}}.daftra.com/api2
Production
https://{{subdomain}}.daftra.com/api2
POST
https://{{subdomain}}.daftra.com/api2
/credit_notes{format}
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'https://.daftra.com/api2/credit_notes' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--header 'apikey: ' \
--header 'Content-Type: application/json' \
--data-raw '{
    "CreditNote": {
        "staff_id": 0,
        "subscription_id": null,
        "store_id": 0,
        "no": "0700000AAAAA0001",
        "po_number": 26,
        "name": "string",
        "client_id": 15,
        "is_offline": true,
        "currency_code": "USD",
        "client_business_name": "Example Client",
        "client_first_name": "Example",
        "client_last_name": "Client",
        "client_email": "client@example.com",
        "client_address1": "string",
        "client_address2": "string",
        "client_postal_code": "string",
        "client_city": "string",
        "client_state": "string",
        "client_country_code": "EG",
        "date": "2018-11-07",
        "draft": "0",
        "discount": 0,
        "discount_amount": 0,
        "deposit": 0,
        "deposit_type": 0,
        "notes": "string",
        "html_notes": "string",
        "invoice_layout_id": 1,
        "estimate_id": "The primary store id",
        "shipping_options": "",
        "shipping_amount": null,
        "client_active_secondary_address": true,
        "client_secondary_name": "string",
        "client_secondary_address1": "string",
        "client_secondary_address2": "string",
        "client_secondary_city": "string",
        "client_secondary_state": "string",
        "client_secondary_postal_code": "string",
        "client_secondary_country_code": "string",
        "follow_up_status": null,
        "work_order_id": null,
        "requisition_delivery_status": null,
        "pos_shift_id": null,
        "qr_code_url": "https://yoursite.daftra.com/qr/?d64=QVE1TmIyaGhiV1ZrSUVGemFISmhaZ0lJTVRFMU16WTJRMUlERkRJd01qSXRNVEF0TWpoVU1EQTZNREU2TVRWYUJBRXdCUUV3",
        "invoice_html_url": "https://yoursite.daftra.com/invoices/preview/2621?hash=c06543fe13bd4850b521733687c53259",
        "invoice_pdf_url": "https://yoursite.daftra.com/invoices/view/2621.pdf?hash=c06543fe13bd4850b521733687c53259"
    },
    "InvoiceItem": [
        {
            "invoice_id": 0,
            "item": "string",
            "description": "string",
            "unit_price": 0,
            "quantity": 0,
            "tax1": 0,
            "tax2": 0,
            "product_id": 0,
            "col_3": null,
            "col_4": null,
            "col_5": null,
            "discount": 0,
            "discount_type": "1 => Percentage",
            "store_id": "The invoice store id"
        }
    ],
    "InvoicePayment": [
        {
            "invoice_id": 0,
            "payment_method": "string",
            "amount": 0,
            "transaction_id": "string",
            "treasury_id": 0,
            "date": "2019-08-24T14:15:22Z",
            "email": "string",
            "status": 0,
            "notes": "string",
            "response_code": "string",
            "response_message": "string",
            "created": "2019-08-24T14:15:22Z",
            "modified": "2019-08-24T14:15:22Z",
            "currency_code": "str",
            "first_name": "string",
            "last_name": "string",
            "address1": "string",
            "address2": "string",
            "city": "string",
            "state": "string",
            "postal_code": "string",
            "country_code": "str",
            "phone1": "string",
            "phone2": "string",
            "transaction_type": "string",
            "processed": true,
            "attachment": "string",
            "staff_id": 0,
            "receipt_notes": "string"
        }
    ],
    "InvoiceCustomField": {},
    "Deposit": {},
    "InvoiceReminder": {},
    "Document": {},
    "DocumentTitle": {}
}'
Response Response Example
202 - Example 1
{
    "code": 202,
    "result": "successful",
    "id": "2415"
}

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params

Header Params

Body Params application/json

Examples

Responses

🟢202Accepted
application/json
Created
Body

🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
🟠404Record Not Found
Previous
Delete Credit Notes
Next
GET All Refund Receipts