purchases

POST /companies/{companySlug}/purchases/drafts/{draftId}/attachments

Changed on

Creates and adds a new attachment to a draft

Request

  • Base URL
    https://api.fiken.no/api/v2
  • URL
    https://api.fiken.no/api/v2/companies/{companySlug}/purchases/drafts/{draftId}/attachments
  • Auth
    OAuth 2
    Authorization code: https://fiken.no/oauth/authorize
    Token URL: https://fiken.no/oauth/token

Query parameters

ehfDocumentIdinteger

Instead of uploading a file, attach an existing received EHF document by its ehfDocumentId. The source EHF is marked as used and leaves the unprocessed view. Provide exactly one of file, ehfDocumentId or inboxDocumentId.

inboxDocumentIdinteger

Instead of uploading a file, attach an existing inbox document by its inboxDocumentId. The source document is marked as used and leaves the unused inbox view. Provide exactly one of file, ehfDocumentId or inboxDocumentId.

Request body multipart/form-data

filenamestring

Required. The filename. Must end with either .png, .jpeg, .jpg, .gif or .pdf

filestring binary

Example request

{
  "filename": "invoice_24760.pdf",
  "file": "https://fiken.no/api/v2/files/745b2f15-gh75-4408-bgf2-b1d2dt610cb2/invoice24760.pdf"
}

Response

Created

Changes

    • info

      added the new optional query request parameter ehfDocumentId

    • info

      added the new optional query request parameter inboxDocumentId

    • info

      the endpoint scheme security fiken_api_oauth was removed from the API