Manymore Partner API

The partner API is built using GraphQL and is designed for businesses wishing to automate the salary payment process for their freelance workforce.

You can get access to the API sandbox here

GraphiQL

A GraphiQL IDE is provided for developers to easily start experimenting with the API.

The left window is the query editor, and the right window displays the result returned by the API.

The 'Docs' button in the top right corner will open the Documentation Explorer. In it you can find information about all available queries and mutations.

The 'Request Headers' button in the bottom left corner will bring up the headers window. In it you'll have to provide your API key in the format {"Authorization": "Bearer <key>"}

Issuing a payout

To issue your first payout you'll have to take the following steps:

  • Find or create a client (invoice receiver) record
  • Find an occupation code that best describes what your freelancer is doing
  • Import the information about your freelancer
  • Create and submit an invoice

Finding a client record

When your partner account is set up, we will create a client record for you with your company's details.

You can your list of clients with the following query:

{ clients { id, name, orgNumber } }
{ "data": { "clients": [ { "id": "Q2xpZW50LWUzYTQ4M2VmLWQwYTctNDI1OC05MDJiLWJkNzYxOWM0YjliOA==", "name": "MANYMORE.COM AS", "orgNumber": "923004114" } ] } }

Pick a client record that you want to use for your invoices. You'll have to use the client's ID when creating an invoice.

Finding an occupation code

Once you know which norwegian occupation codes describe your freelancers' tasks, you can find corresponding occupation code records in the API.

Use the following query to get an occupation code record:

{ occupationCode(code: "9330106") { id, name, code } }
{ "data": { "occupationCode": { "id": "T2NjdXBhdGlvbkNvZGUtZWZiOTU1MTctZTVlMC00OGI4LWE3YjUtNzQwYTViY2Y0OTU4", "name": "ALTMULIGMANN (LAGER OG GODSHĂ…NDTERING)", "code": "9330106" } } }

Save the occupation code ID for later use.

Importing a freelancer

We need a bunch of information about a freelancer before we can issue a payout. You can send the requred information using the 'importEnrollment' mutation:

mutation { importEnrollment( input: { attributes: { email: "freelancer@example.com", personalNumber: "00000000001", firstName: "Free", lastName: "Lancer", dateOfBirth: "2000-01-01", bankAccountNumber: "12345678901", address: { line1: "1 Main str.", line2: "Apt 101", postalCode: "1000", city: "Oslo", country: "NO" } } } ) { enrollment { id } errors { code path } } }
{ "data": { "importEnrollment": { "enrollment": { "id": "RW5yb2xsbWVudC05NjczN2M1MC02MjI5LTQ3YzItOGZiZS1lMWVjYzBhNjkzMjg=" }, "errors": [] } } }

Save the ID of the enrollment. You'll be using it to issue payouts to the freelancer.

Creating an invoice

Use the client ID, occupation code ID and enrollment ID from the previous responses to create an invoice:

mutation { createInvoice( input: { enrollmentId: "RW5yb2xsbWVudC05NjczN2M1MC02MjI5LTQ3YzItOGZiZS1lMWVjYzBhNjkzMjg=", attributes: { clientId: "Q2xpZW50LWUzYTQ4M2VmLWQwYTctNDI1OC05MDJiLWJkNzYxOWM0YjliOA==", idempotencyKey: "100200300", buyerReference: "buyref", orderReference: "ordref", invoicedOn: "2022-05-18", dueOn: "2022-06-18", lines: [ { occupationCodeId: "T2NjdXBhdGlvbkNvZGUtZWZiOTU1MTctZTVlMC00OGI4LWE3YjUtNzQwYTViY2Y0OTU4", description: "description", unitPrice: 10000, quantity: 2, vatRate: 0.25, workStartedAt: "2022-05-17 10:00", workEndedAt: "2022-05-17 12:00" } ] } } ) { invoice { id } errors { code path } } }
{ "data": { "createInvoice": { "invoice": { "id": "SW52b2ljZS05ZmQwNzE1Ni1jZWY3LTQ2ZGUtOGRlNy0xODFhZWZlYmQwMjU=" }, "errors": [] } } }

Save the ID of the invoice. You'll need it to submit the invoice.