sales

GET /companies/{companySlug}/sales/drafts

Changed on

Returns all sale drafts for given company.

Request

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

Query parameters

pageinteger

Returns the number of the page to return. Valid page values are integers from 0 to the total number of pages. Default value is 0.

pageSizeinteger

Defines the number of entries to return on each page. Maximum number of results that can be returned at one time are 100. Default value is 25.

Response

OK

draftIdinteger

Draft ID

uuidstring

UUID are represented as 32 hexadecimal (base-16) digits, displayed in 5 groups separated by hyphens, in the form 8-4-4-4-12 for a total of 36 characters.

invoiceIssueDatestring date

Issue date of the draft, format yyyy-mm-dd

dueDatestring date

Due date of draft, format yyyy-mm-dd

invoiceNumberstring

If invoice associated with draft, this is the invoice number (not to be confused with the invoiceId of an invoice issued from Fiken)

cashboolean

If a cash sale/purchase (true) or otherwise (false)

currencystring

ISO 4217 currency code

kidstring

Norwegian KID number. Number from 2 to 25 digits long.

paidboolean

Whether the sale/purchase has been paid (true) or not (false)

Example response

[
  {
    "draftId": 2888156,
    "uuid": "123e4567-e89b-12d3-a456-426655440000",
    "invoiceIssueDate": "2018-04-03",
    "dueDate": "2018-04-03",
    "invoiceNumber": "NOEE2888156",
    "contact": {
      "contactId": 2747365,
      "createdDate": "2018-04-03",
      "lastModifiedDate": "2018-04-03",
      "name": "Fiken AS",
      "email": "kontakt@fiken.gmail",
      "organizationNumber": "913312465",
      "customerNumber": 51248,
      "customerAccountCode": "1500:20001",
      "phoneNumber": "62158537",
      "memberNumber": 5464,
      "memberNumberString": "5464",
      "supplierAccountCode": "2400:20001",
      "bankAccountNumber": "11112233334",
      "contactPerson": [
        {
          "contactPersonId": 2747365,
          "name": "Betty Boop",
          "email": "bb@gmail.com",
          "phoneNumber": "98573564",
          "address": {
            "streetAddress": "Karl Johan 34",
            "streetAddressLine2": "H0405",
            "city": "Oslo",
            "postCode": "0550",
            "country": "Norway"
          }
        }
      ],
      "notes": [
        {
          "author": "Betty Boop",
          "note": "Garage 45"
        }
      ],
      "currency": "NOK",
      "language": "Norwegian",
      "inactive": true,
      "daysUntilInvoicingDueDate": 15,
      "discount": 25,
      "address": {
        "streetAddress": "Karl Johan 34",
        "streetAddressLine2": "H0405",
        "city": "Oslo",
        "postCode": "0550",
        "country": "Norway"
      },
      "documents": [
        {
          "uuid": "745b2f15-1234-4408-8bf2-b1d2d7610cb2",
          "filename": "invoice_24760.pdf",
          "identifier": "24760",
          "type": "invoice"
        }
      ]
    },
    "project": {
      "projectId": 73408306,
      "startDate": "2018-04-03",
      "endDate": "2018-04-03",
      "contact": {
        "contactId": 2747365,
        "createdDate": "2018-04-03",
        "lastModifiedDate": "2018-04-03",
        "name": "Fiken AS",
        "email": "kontakt@fiken.gmail",
        "organizationNumber": "913312465",
        "customerNumber": 51248,
        "customerAccountCode": "1500:20001",
        "phoneNumber": "62158537",
        "memberNumber": 5464,
        "memberNumberString": "5464",
        "supplierAccountCode": "2400:20001",
        "bankAccountNumber": "11112233334",
        "contactPerson": [
          {
            "contactPersonId": 2747365,
            "name": "Betty Boop",
            "email": "bb@gmail.com",
            "phoneNumber": "98573564",
            "address": {
              "streetAddress": "Karl Johan 34",
              "streetAddressLine2": "H0405",
              "city": "Oslo",
              "postCode": "0550",
              "country": "Norway"
            }
          }
        ],
        "notes": [
          {
            "author": "Betty Boop",
            "note": "Garage 45"
          }
        ],
        "currency": "NOK",
        "language": "Norwegian",
        "inactive": true,
        "daysUntilInvoicingDueDate": 15,
        "discount": 25,
        "address": {
          "streetAddress": "Karl Johan 34",
          "streetAddressLine2": "H0405",
          "city": "Oslo",
          "postCode": "0550",
          "country": "Norway"
        },
        "documents": [
          {
            "uuid": "745b2f15-1234-4408-8bf2-b1d2d7610cb2",
            "filename": "invoice_24760.pdf",
            "identifier": "24760",
            "type": "invoice"
          }
        ]
      }
    },
    "currency": "NOK",
    "kid": "5855454756",
    "attachments": [
      {
        "uuid": "745b2f15-1234-4408-8bf2-b1d2d7610cb2",
        "filename": "invoice_24760.pdf",
        "identifier": "24760",
        "type": "invoice"
      }
    ],
    "payments": [
      {
        "paymentId": 2888156,
        "date": "2018-04-03",
        "account": "1920:10001",
        "amount": 34000,
        "amountInNok": 500000,
        "currency": "NOK"
      }
    ],
    "lines": [
      {
        "incomeAccount": "3000",
        "net": 25000,
        "gross": 30000,
        "project": {
          "projectId": 73408306,
          "startDate": "2018-04-03",
          "endDate": "2018-04-03",
          "contact": {
            "contactId": 2747365,
            "createdDate": "2018-04-03",
            "lastModifiedDate": "2018-04-03",
            "name": "Fiken AS",
            "email": "kontakt@fiken.gmail",
            "organizationNumber": "913312465",
            "customerNumber": 51248,
            "customerAccountCode": "1500:20001",
            "phoneNumber": "62158537",
            "memberNumber": 5464,
            "memberNumberString": "5464",
            "supplierAccountCode": "2400:20001",
            "bankAccountNumber": "11112233334",
            "contactPerson": [
              {
                "contactPersonId": 2747365,
                "name": "Betty Boop",
                "email": "bb@gmail.com",
                "phoneNumber": "98573564",
                "address": {
                  "streetAddress": "Karl Johan 34",
                  "streetAddressLine2": "H0405",
                  "city": "Oslo",
                  "postCode": "0550",
                  "country": "Norway"
                }
              }
            ],
            "notes": [
              {
                "author": "Betty Boop",
                "note": "Garage 45"
              }
            ],
            "currency": "NOK",
            "language": "Norwegian",
            "inactive": true,
            "daysUntilInvoicingDueDate": 15,
            "discount": 25,
            "address": {
              "streetAddress": "Karl Johan 34",
              "streetAddressLine2": "H0405",
              "city": "Oslo",
              "postCode": "0550",
              "country": "Norway"
            },
            "documents": [
              {
                "uuid": "745b2f15-1234-4408-8bf2-b1d2d7610cb2",
                "filename": "invoice_24760.pdf",
                "identifier": "24760",
                "type": "invoice"
              }
            ]
          }
        }
      }
    ]
  }
]

Changes

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property /////// to the response with the status

    • info

      added the optional property /////// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      the response optional property /// became not read-only for the status

    • info

      added the optional write-only property items/contact/memberNumberString to the response with the status

    • info

      added the optional write-only property items/lines/items/project/contact/memberNumberString to the response with the status

    • info

      added the optional write-only property items/project/contact/memberNumberString to the response with the status

    • info

      response property items/contact/memberNumber deprecated

    • info

      response property items/lines/items/project/contact/memberNumber deprecated

    • info

      response property items/project/contact/memberNumber deprecated