Credit Notes

The credit note object represents credit notes created against a booking. These notes provide a refundable amount to a customer, illustrated in a user-friendly format.


Credit Note Model

Properties

  • Name
    id
    Type
    uuid
    Description

    The unique id of the credit note.

  • Name
    short_id
    Type
    string
    Description

    A shorter user-friendly ID for customer sharing.

  • Name
    customer_name
    Type
    string
    Description

    The name of the customer to whom the credit note is issued.

  • Name
    amount
    Type
    integer
    Description

    The amount the credit note is for.

  • Name
    description
    Type
    string
    Description

    A description of what the credit note covers.

  • Name
    currency
    Type
    string
    Description

    The currency of the credit note. See currency documentation.

  • Name
    organisation
    Type
    object
    Description

    Compact organisation information representing the payment link's owner.

  • Name
    booking_applied_to
    Type
    object
    Description

    The booking model this credit note was applied to.

  • Name
    booking_created_from
    Type
    object
    Description

    The booking model from which this credit note was created.

<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-json" style="white-space:pre;color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;59e904da-e2da-446b-867c-4403503b482f&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;short_id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;0BN07IX6VJ&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;customer_name&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;Adam Clark&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;amount&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">5000</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;description&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;An example credit note&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;currency&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;GBX&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;organisation&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;X1234&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;name&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;Felloh&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;image&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;organisation/x1234.png&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;legacy_id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;e4ebe1d6-d907-477c-a107-e26c74cf6034&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;created_at&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2022-01-15T00:48:41.255Z&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;updated_at&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2022-07-27T11:43:42.977Z&quot;</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;created_at&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2022-10-28T11:53:14.675Z&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;booking_applied_to&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;c25af1be-b643-4ef7-b66f-55124eaa224f&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;booking_reference&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;testing321&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;created_at&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2022-10-20T08:39:15.843Z&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;customer_name&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;Lorna&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;departure_date&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2022-11-11&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;return_date&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2022-12-31&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;email&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;test@felloh.com&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;gross_amount&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">10000</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;booking_created_from&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;f5c48838-a45a-4c4e-b267-36c8c17b0551&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;booking_reference&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;test-19126&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;created_at&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2022-08-05T14:58:20.458Z&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;customer_name&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;Adam Clark&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;departure_date&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token null" style="color:#569CD6">null</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;return_date&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token null" style="color:#569CD6">null</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;email&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;test@felloh.com&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;gross_amount&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">120000</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span></span><span class="token" style="color:#d4d4d4">}</span><span>
</span></code></pre></div>

Fetch All

This endpoint retrieves all credit notes for an organisation.

Parameters

  • Name
    organisationrequired
    Type
    string
    Description

    The organisation ID to fetch credit notes for. Use the List all organisations method to retrieve accessible organisations.

  • Name
    skip
    Type
    integer
    Description

    Pagination offset. See the pagination section for details.

  • Name
    take
    Type
    integer
    Description

    Number of records to return. See the pagination section for details.

Returns

Returns an array of Credit Note Models

Request

POST
/agent/credit-notes
<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-javascript" style="white-space:pre;color:#9cdcfe;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#c586c0">import</span><span> </span><span class="token">axios</span><span> </span><span class="token" style="color:#c586c0">from</span><span> </span><span class="token" style="color:#ce9178">&#x27;axios&#x27;</span><span class="token" style="color:#d4d4d4">;</span><span>
</span>
<span></span><span class="token" style="color:#569CD6">const</span><span> response </span><span class="token" style="color:#d4d4d4">=</span><span> </span><span class="token" style="color:#c586c0">await</span><span> axios</span><span class="token" style="color:#d4d4d4">.</span><span class="token method property-access" style="color:#c0a9e5">post</span><span class="token" style="color:#d4d4d4">(</span><span>
</span><span>  </span><span class="token" style="color:#ce9178">&#x27;https://api.felloh.com/agent/credit-notes&#x27;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>    </span><span class="token literal-property" style="color:#9cdcfe">organisation</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&#x27;X9876&#x27;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token literal-property" style="color:#9cdcfe">skip</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">10</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token literal-property" style="color:#9cdcfe">take</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">20</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>    </span><span class="token literal-property" style="color:#9cdcfe">headers</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span> </span><span class="token string-property" style="color:#9cdcfe">&#x27;Content-Type&#x27;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&#x27;application/json&#x27;</span><span class="token" style="color:#d4d4d4">,</span><span> </span><span class="token string-property" style="color:#9cdcfe">&#x27;Authorization&#x27;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span class="token template-string" style="color:#ce9178">Bearer &lt;YOUR TOKEN HERE&gt;</span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span> </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span></span><span class="token" style="color:#d4d4d4">)</span><span class="token" style="color:#d4d4d4">;</span><span>
</span></code></pre></div>
<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-json" style="white-space:pre;color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;data&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">[</span><span>
</span><span>    </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;59e904da-e2da-446b-867c-4403503b482f&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;short_id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;0BN07IX6VJ&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;customer_name&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;Adam Clark&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;amount&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">5000</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;description&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;An example credit note&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;currency&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;GBX&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;organisation&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;X1234&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;name&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;Felloh&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;image&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;organisation/x1234.png&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;legacy_id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;e4ebe1d6-d907-477c-a107-e26c74cf6034&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;created_at&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2022-01-15T00:48:41.255Z&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;updated_at&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2022-07-27T11:43:42.977Z&quot;</span><span>
</span><span>      </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;created_at&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2022-10-28T11:53:14.675Z&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;booking_applied_to&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;c25af1be-b643-4ef7-b66f-55124eaa224f&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;booking_reference&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;testing321&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;created_at&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2022-10-20T08:39:15.843Z&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;customer_name&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;Lorna&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;departure_date&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2022-11-11&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;return_date&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2022-12-31&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;email&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;test@felloh.com&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;gross_amount&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">10000</span><span>
</span><span>      </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;booking_created_from&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;f5c48838-a45a-4c4e-b267-36c8c17b0551&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;booking_reference&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;test-19126&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;created_at&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2022-08-05T14:58:20.458Z&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;customer_name&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;Adam Clark&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;departure_date&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token null" style="color:#569CD6">null</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;return_date&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token null" style="color:#569CD6">null</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;email&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;test@felloh.com&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>        </span><span class="token" style="color:#9cdcfe">&quot;gross_amount&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">120000</span><span>
</span><span>      </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span>    </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">]</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;errors&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">[</span><span class="token" style="color:#d4d4d4">]</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;meta&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;code&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">200</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;reason&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;OK&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;message&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;The request was successful&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;request_id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;84901a6e-e78b-4d96-b657-d37ca6b445c4&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;count&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">1</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span></span><span class="token" style="color:#d4d4d4">}</span><span>
</span></code></pre></div>

Fetch One

This endpoint allows you to retrieve a single credit note by its ID.

Path Parameters

  • Name
    credit_note_id
    Type
    uuid
    Description

    The credit note ID to retrieve.

Returns

Returns a Credit Note Model

Request

GET
/agent/credit-notes/:credit_note_id
<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-javascript" style="white-space:pre;color:#9cdcfe;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#c586c0">import</span><span> </span><span class="token">axios</span><span> </span><span class="token" style="color:#c586c0">from</span><span> </span><span class="token" style="color:#ce9178">&#x27;axios&#x27;</span><span class="token" style="color:#d4d4d4">;</span><span>
</span>
<span></span><span class="token" style="color:#569CD6">const</span><span> creditNoteID </span><span class="token" style="color:#d4d4d4">=</span><span> </span><span class="token" style="color:#ce9178">&#x27;59e904da-e2da-446b-867c-4403503b482f&#x27;</span><span class="token" style="color:#d4d4d4">;</span><span>
</span>
<span></span><span class="token" style="color:#569CD6">const</span><span> response </span><span class="token" style="color:#d4d4d4">=</span><span> </span><span class="token" style="color:#c586c0">await</span><span> axios</span><span class="token" style="color:#d4d4d4">.</span><span class="token method property-access" style="color:#c0a9e5">get</span><span class="token" style="color:#d4d4d4">(</span><span>
</span><span>  </span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span class="token template-string" style="color:#ce9178">https://api.felloh.com/agent/credit-notes/</span><span class="token template-string" style="color:#569cd6">${</span><span class="token template-string" style="color:#9cdcfe">creditNoteID</span><span class="token template-string" style="color:#569cd6">}</span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>    </span><span class="token literal-property" style="color:#9cdcfe">headers</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span> </span><span class="token string-property" style="color:#9cdcfe">&#x27;Content-Type&#x27;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&#x27;application/json&#x27;</span><span class="token" style="color:#d4d4d4">,</span><span> </span><span class="token string-property" style="color:#9cdcfe">&#x27;Authorization&#x27;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span class="token template-string" style="color:#ce9178">Bearer &lt;YOUR TOKEN HERE&gt;</span><span class="token template-string template-punctuation" style="color:#ce9178">`</span><span> </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span></span><span class="token" style="color:#d4d4d4">)</span><span class="token" style="color:#d4d4d4">;</span><span>
</span></code></pre></div>
<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-json" style="white-space:pre;color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Courier New&quot;, monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>  </span><span class="token" style="color:#9cdcfe">&quot;data&quot;</span><span class="token" style="color:#d4d4d4">:</span><span>     </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;59e904da-e2da-446b-867c-4403503b482f&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;short_id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;0BN07IX6VJ&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;customer_name&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;Adam Clark&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;amount&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">5000</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;description&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;An example credit note&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;currency&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;GBX&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;organisation&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;X1234&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;name&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;Felloh&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;image&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;organisation/x1234.png&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;legacy_id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;e4ebe1d6-d907-477c-a107-e26c74cf6034&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;created_at&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2022-01-15T00:48:41.255Z&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;updated_at&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2022-07-27T11:43:42.977Z&quot;</span><span>
</span><span>    </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;created_at&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2022-10-28T11:53:14.675Z&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;booking_applied_to&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;c25af1be-b643-4ef7-b66f-55124eaa224f&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;booking_reference&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;testing321&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;created_at&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2022-10-20T08:39:15.843Z&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;customer_name&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;Lorna&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;departure_date&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2022-11-11&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;return_date&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2022-12-31&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;email&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;lorna@felloh.com&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;gross_amount&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">10000</span><span>
</span><span>    </span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>    </span><span class="token" style="color:#9cdcfe">&quot;booking_created_from&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;id&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;f5c48838-a45a-4c4e-b267-36c8c17b0551&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;booking_reference&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;test-19126&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;created_at&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;2022-08-05T14:58:20.458Z&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;customer_name&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;Adam Clark&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;departure_date&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token null" style="color:#569CD6">null</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;return_date&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token null" style="color:#569CD6">null</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;email&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">&quot;ad@mclark.co&quot;</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span>      </span><span class="token" style="color:#9cdcfe">&quot;gross_amount&quot;</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">120000</span><span>
</span><span>    </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span>  </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span></span><span class="token" style="color:#d4d4d4">}</span><span>
</span></code></pre></div>