EMS - API Documentation - POST Addpaymentdetail

Introduction

API-endpoint for adding payments for a member.

Parameters

This is additional to required parameters as described:

https://idrettsforbundet.atlassian.net/wiki/spaces/DDTII/pages/14024708

Headers

Eksempel

kommentar

Headers

Eksempel

kommentar

 

 

 

 

 

 

Querystring

Eksempel

Kommentar

Querystring

Eksempel

Kommentar

 

 

 

 

 

 

Dataobjekter:

Name

Required

Description

Example

Name

Required

Description

Example

Amount

Yes

Total amount for the payment

450

Comment

No, but recommended

Describing text, concerning the payment

 

ExternalId

Yes

External, traceable identification for the payment or invoice

 

IsFamilyMember

No

Is this persons payment a part of a family

 

IsPaid

Yes

Wheter the invoice is paid or not

 

OrgId

Yes

OrgId, unique identifier for Club (PaymentTypeId=0), or branch (PaymentTypeId = 2)

 

PaidDate

Yes

Paid date

2020-10-15

PaidToOrgId

Yes

OrgId, unique identifier for Club (PaymentTypeId=0), or branch (PaymentTypeId = 2)

 

PaymentCategory

Yes

Category (text)

 

PaymentTypeId

Yes

Payment type

Membership, club level: 0

Training fee, branch level: 2

0 = Medlemsskap i klubb
2 = Treningsavgift (gjelder ikke gruppe “Allidrett” og “Bedriftsidrett”)

PeriodFrom

Yes

From date. Must be this year, must be greater than membership start date.

 

PeriodFrom

Yes

To date. Must be greater than PeriodFrom

 

PersonId

Yes

PersonId, unique identifier for person. Must be existing personId.

 

Eksempler

JSON Request

 

{ "amount": "450", "comment": "This was paid for club membership", "externalId": "3248", "isFamilyMember": "true", "isPaid": "false", "orgId": "7896", "paidDate": "2015-05-08", "paidToOrgId": "4568", "paymentCategory": "Club membership", "paymentTypeId": 0, "periodFrom": "2015-05-08", "periodTo": "2015-06-08", "personId": "8675682" }

JSON Response

 

{ "message": "Payment details added for membership of {personId} with {orgId} for period {periodFrom} to {periodTo}", "updatedPersonId": 0, "paymentTypeId": 0, "paymentId": 0, "paymentCategory": "string" }

JSON Response koder

Kode

Kommentar

 

Kode

Kommentar

 

200 (http)

Payment registert OK

 

3000

PeriodFrom and PeriodTo is not in same year

 

3001

No membership found in between dates

 

3006

Invalid period

 

3007

Invalid paiddate

 

3008

Invalid OrgId

 

3009

Invalid paymenttype

 

3010

Invalid period

 

1006

Invalid branchId

 

1002

PersonId does not exist

 

Endpoints

URL

Miljø

Kommentar

URL

Miljø

Kommentar

https://api-dst.nif.no/api/v1/payment/Addpaymentdetail

DST

 

https://api.nif.no/api/v1/payment/Addpaymentdetail

PROD