Connect
  1. Order
Connect
  • Connect/ConnectID API Reference
  • Overview
    • API lifecycle
    • OAuth 2.0
    • About the URLs
    • Google analytics
    • Unite payment SDK
    • Events
      • Authentication
      • Connect realtime events
      • ConnectID events
  • Customer Data
    • Address
      • Change addresses
      • List addresses
      • List addresses - client mode
      • List addresses for product - client mode
      • List addresses for product
    • Category
      • List category types
      • List category codes
      • List category codes for category type
    • Customer
      • List customer info
      • Change customer Info
      • Search customer - client mode
      • Check customer number - client mode
      • List customer info - client mode
    • External Reference
      • Remove external reference - client mode
      • Change external reference - client mode
      • List external references - client mode
      • Register external reference - client mode
  • Order Management
    • Article
      • Check article price
    • Coupon
      • Check coupon price - client mode
      • List coupon - client mode
      • List coupon for coupon number - client mode
    • Fulfillment
      • Complete order - client mode
    • Order
      • Order Guide
        • Introduction
        • How to register an order
        • Complete order by fulfillment URL
        • Complete order by fulfillment API
        • Q&A for order
      • List orders
        GET
      • Search order details
        POST
      • List order product history
        GET
      • List order status - client mode
        GET
      • Register customer - client mode
        POST
      • Register customer
        POST
      • Register order - client mode
        POST
      • Register order
        POST
    • Reward
      • Check reward - client mode
    • User
      • Assign user - client mode
    • Voucher Coupons
      • List voucher code coupons - client mode
  • Payment Services
    • Invoice
      • List invoice details
      • List invoices - client mode
      • List invoices for product - client mode
      • List invoices and reminders
      • List invoices and reminders for product
      • List basic invoice info
      • List basic invoice info for product
    • InvoiceAddress
      • List invoice address
    • Klarna
      • List klarna recurring tokens
      • Add Klarna token
      • Remove Klarna token
    • Nexi
      • List Nexi subscriptions
      • Add Nexi subscription
      • Remove Nexi subscription
    • PayEx
      • List PayEx tokens
      • Add PayEx token
      • Remove PayEx token
    • Payment
      • List payment methods
      • Pay invoice
      • Change payment method
    • Vipps
      • List vipps agreements
      • Add vipps agreement
      • Remove vipps agreement
  • Privacy
    • Consent
      • Access private data
      • Remove private data
      • List consent event history - client mode
      • List consent text - client mode
      • List consent text history - client mode
      • List consent groups - client mode
      • List consent given issuer - client mode
      • List consent event history
      • List consent given issuer
      • List consent groups
      • Register consent event - client mode
      • Register consent event
    • Permission/Shield
      • List global permissions
      • List enterprise permissions
      • Change enterprise permissions
      • List ordertype permissions
      • Change ordertype permissions
      • Check shield ordertype - client mode
      • Check shield enterprise - client mode
    • Privacy
      • List privacy enterprise
      • Change privacy enterprise
      • List privacy ordertype
      • Change privacy ordertype
  • Product & Services
    • Complaint
      • Register complaint
      • List complaints
    • Delivery
      • List next distributions
      • List next distributions - client mode
    • DeliveryStop
      • Remove delivery stops
      • Register delivery stops
      • List delivery stops
      • List delivery stop - client mode
    • Issue
      • List distributed issues
      • List product issues - client mode
    • Product
      • List products - client mode
      • Check product - client mode
      • List specific products - client mode
    • ProductDeliveryPlan
      • List productdeliveryplan - client mode
    • ProductDependency
      • Check product dependency discount - client mode
    • Sharing
      • Send subscription share invitation
      • Accept subscription share invitation
      • Decline share - client mode
      • List shareable subscription rules
      • List distribution levels
      • Change subscription share invitation details
      • List all shared subscribers
      • Cancel sharing
      • List shareable subscription nets
      • Change shareable subscription nets
      • Change distribution level
    • Subscription
      • List shared subscriptions
      • List subscriptions
      • Start subscription
      • List subscriptions - client mode
  • Recruitment
    • Recruitment
      • Register recruitment - client mode
      • List recruitments
      • List premium recruitments
      • Change premium recruitments
      • Register recruitments
    • RecruitmentCampaign
      • List recruitment campaign - client mode
  • User Data
    • Access
      • Check access
      • Check access - client mode
    • Credential
      • Check credential - client mode
    • Metadata
      • List metadata
      • Change metadata
      • Remove metadata
      • List metadata - client mode
      • Change metadata - client mode
      • Remove metadata - client mode
    • Profile
      • List user profile
      • List external user profiles
  • Diverse
    • External Identity
      • Register external Id - client mode
      • Register customer - client mode
    • Message
      • List messages
      • Send message
      • Send message - client mode
    • Status
      • List status messages
    • Stock
      • Change stocks - client mode
      • List stocks - client mode
      • List stocks for product - client mode
  1. Order

Register order - client mode

Production
https://api.mediaconnect.no/capi
Production
https://api.mediaconnect.no/capi
POST
/v1/client/order
Order

Only the client needs to be logged in to use this endpoint. The user does not need to be logged in, click here to read more.

API for creating an order. The order can contain one or more lines. Each line may contain a receiver. If Marketing coupon is used both marketing coupon, i.e marketingCouponCode and marketingCouponNumber, fields are required.

There are several possible payment methods. Payment provider configuration is needed to use these payment methods, excluding free and invoice. In order to set up this configuration, please contact Unite by sending an email to support@mediaconnect.no. Some of the payment providers support recurring payment and prepayment, see the table below.

<
paymentMethod recurring=true recurring=false prepaid=true prepaid=false
invoice ✔ ✔ ✔
sms (Link Mobility) ✔ ✔
smsPay ✔ ✔
vippsRecurring
(Faste betalinger med Vipps)
✔ ✔
kco (Klarna) ✔ ✔ ✔ ✔
creditcardPayex ✔ ✔ ✔ ✔
swishPayex ✔ ✔ ✔
vippsEcommerce
(single payment)
✔ ✔ ✔
nexi ✔ ✔ ✔ ✔
other ✔ ✔

Commonly required fields:

  • companyName or lastName
  • postalCode
  • emails or phoneNumbers

After placing an order to the client order API, the order needs to be fulfilled. This can be done either with a redirect or using an API call.
The specific use-case dictates whether how the fulfillment process can be performed. If the fulfillment includes an interactive payment process (e.g. card payment), the redirect must be used. If the order is prepaid, or does not involve the user for payment (e.g. invoice), the API for fulfillment may be used.

For the redirect case, the user must be redirected to the URL for fulfillment (https://connectid.no/user/fulfillment or https://connectid.se/user/fulfillment). Depending on the payment method on the order the user will be further redirected to an external payment service.
Read more about fulfillment URL.

The API endpoint for fulfillment is described here.

Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location --request POST 'https://api.mediaconnect.no/capi/v1/client/order' \
--header 'Content-Type: application/json' \
--data-raw '{
    "externalOrderId": "23456",
    "orderDate": 1547078400000,
    "paymentMethod": "creditcardPayex",
    "orderAmount": 150,
    "currency": "NOK",
    "marketingCouponCode": "NOA3263",
    "marketingCouponNumber": 51,
    "campaignParameters": "?param=Datanews&param2=Dataold",
    "companyCode": "468979834",
    "seller": "AY",
    "salesMethod": "ST",
    "payer": {
        "customerNumber": 71,
        "personsSocialSecurityNumber": "890102-3286",
        "firstName": "Kari",
        "middleName": "Snøhaug",
        "lastName": "Nordmann",
        "street": "Osloveien",
        "streetNumber": 12,
        "floorType": "H",
        "floor": 3,
        "postalCode": "0101",
        "postalPlace": "Oslo",
        "postalAddress": "Postboks 6",
        "postalAddressPostalCode": "0216",
        "postalAddressPostalPlace": "Oslo",
        "countryCode": "NO",
        "birthDate": 694224000000,
        "sex": "female",
        "emails": [
            "kari.nordmann@gmail.com"
        ],
        "phoneNumbers": [
            "+4787654321"
        ],
        "invoiceEmailAddress": "kari@company.com"
    },
    "orderLines": [
        {
            "productSpecType": "coupon",
            "productSpecCode": "VS283",
            "productSpecNo": 1673,
            "quantity": 1,
            "unitPrice": 150,
            "voucherCode": "582358",
            "allowAccessProduct": "29452",
            "allowAccessCategoryType": "TYPE1",
            "allowAccessSeconds": 259200,
            "startInfo": {
                "startDate": 1547078400000,
                "startIssue": "2019-10"
            }
        }
    ],
    "recurring": true,
    "paymentInfoPayEx": {
        "transactionId": "472",
        "merchantId": "54823419",
        "recurrenceToken": "7b9nwomhbok",
        "cardDetails": {
            "cardMaskedPan": "****-******-8271",
            "expMonth": "10",
            "expYear": "24",
            "issuingBank": "Mastercard",
            "cardBrand": "Mastercard",
            "isPanEnrolled": true
        }
    }
}'
Response Response Example
200 - Success
{
    "orderId": 9
}

Request

Authorization
OAuth 2.0
Client Credentials
Add the parameter
Authorization
to Headers
,whose value is to concatenate the Token after the Bearer.
Example:
Authorization: Bearer ********************
Token URL: https://connectid.no/user/oauth/token
Refresh URL: https://connectid.no/user/oauth/token
Scopes:
read-For all access
or
Body Params application/json
externalOrderId
string 
optional
Order ID from the system delivering the order.
<= 40 characters
orderDate
integer 
required
The date the order was placed in the external system.
Unix Epoch timestamps in milliseconds since 1st January 1970 UTC.
paymentMethod
enum<string> 
required
It is only allow to use these payment methods:
invoice: Paying by sending a invoice
free: It is free of cost.
sms: Paying by using SMS via Link Mobility.
smsPay: Paying by using SMS via SMSpay.
masterpass: Paying by using a digital wallet provided by Mastercard.
vippsRecurring: Paying by using Vipps (Faste betalinger med Vipps).
kco: Paying by using Klarna Checkout.
creditcardPayex: Paying by using a credit card via Payex.
swishPayex: Paying by using Swish via Payex.
vippsEcommerce: Paying by using Vipps Ecommerce (single payment).
nexi: Paying by using Nexi.
other: Paying by using own integration with payment provider.
Allowed values:
invoicefreesmssmsPaymasterpassvippsRecurringkcocreditcardPayexswishPayexvippsEcommercenexiother
merchantId
string 
optional
Unique ID that identify the payment provider.
<= 64 characters
orderAmount
number 
required
Total amount for the entire order.
Multiple of:
0.01
currency
string 
required
Currency for the entire order has to follow the standard ISO4217 - alphabetic code.
<= 3 characters
marketingCouponCode
string 
optional
Marketing coupon code to use in a e.g product order.
<= 12 characters
marketingCouponNumber
integer 
optional
Marketing coupon number to use in a e.g product order.
campaignParameters
string 
optional
Field is related to lookup of market coupons. The value is a URL query param which points to a sales place.
<= 64 characters
companyCode
string 
optional
Company code for the products in the order. Company code is used to find correct merchant etc for billing and such. If it is null client’s company code is used.
<= 12 characters
customerReference
string 
optional
Customer reference number.
<= 78 characters
uniqueUserId
string 
required
Unique ID (from Profile API)
seller
string 
optional
Seller code representing the salesperson who made this order come true.
<= 12 characters
salesMethod
string 
optional
Method of sale
<= 12 characters
payer
object (Name and address for payer) 
required
customerNumber
integer 
optional
A valid and existing customer number in the Connect environment
companyRegistrationNumber
string 
optional
A valid registration number in an official registry.
<= 16 characters
companyName
string 
optional
Name of the company.
<= 40 characters
department
string 
deprecated
Name of the department. Use the departmentName field instead of this.
<= 40 characters
departmentName
string 
optional
Name of the department.
<= 40 characters
personsSocialSecurityNumber
string 
optional
A valid personal social security number.
<= 16 characters
firstName
string 
optional
First (given) name.
<= 30 characters
middleName
string 
optional
Middle name.
<= 30 characters
lastName
string 
optional
Last (family) name.
<= 30 characters
coAddress
string 
deprecated
Extra address line if needed. Use the careOfAddress field instead of this.
<= 40 characters
careOfAddress
string 
optional
Extra address line if needed.
<= 40 characters
street
string 
optional
Street address
<= 40 characters
streetNumber
integer 
optional
Street number
entrance
string 
optional
Entrance
<= 12 characters
floorType
string 
optional
Valid values:
H: Main floor
U: Lower floor
L: Attic
K: Basement
<= 1 characters
floor
integer 
optional
Floor.
suite
string 
optional
Suite
<= 10 characters
postalCode
string 
optional
A valid postal code for the street address.
<= 10 characters
postalPlace
string 
optional
Postal place
<= 30 characters
postalAddress
string 
optional
Postal address
<= 40 characters
postalAddressPostalCode
string 
optional
A valid postal code for the postal address
<= 10 characters
postalAddressPostalPlace
string 
optional
Postal place for the postal address.
<= 30 characters
countryCode
string 
optional
The country code for this address - ISO 3166 - alpha-2
<= 3 characters
birthDate
integer 
optional
Birth date if this is a person.
Unix Epoch timestamps in milliseconds since 1st January 1970 UTC.
sex
enum<string> 
optional
Valid values
male: The person is a male.
female: The person is a female.
unknown: The gender is unknown.
Allowed values:
malefemaleunknown
emails
array[string <email>]
optional
A list of email addresses beloning to the person or company. 0, 1 or 2 addresses (each address maximum 255 characters)
>= 0 items<= 2 items
phoneNumbers
array[string]
optional
A list of phone numbers. Up to four phone numbers may be submitted.
A phone number has to follow the telephone number standard E.164
<= 4 items
invoiceEmailAddress
string 
optional
This email will be set for invoices for products that comes in order.
<= 255 characters
categories
array [object {2}] 
optional
Custom data possible to add to any address record. Valid categories are found through the different category APIs.
permissions
array [object {5}] 
optional
Permission data possible to add to any address record. Permissions is not a required element.
privacy
array [object {3}] 
optional
Privacy permission data possible to add to any address record. Privacy permissions are not a required.
orderLines
array [object {18}] 
required
productSpecType
enum<string> 
required
Valid values:
coupon: The way you buy a subscription and it describe it's lifecycle (including price model).
product : It is anything related to news and books that can be offered to the marked.
issue: A single copy of a periodical ex. magazine.
article: An specific article on a website.
Allowed values:
couponproductissuearticle
productSpecCode
string 
optional
Coupon code if productSpecType is coupon or issue.
<= 12 characters
productSpecNo
integer 
optional
Coupon number if productSpecType is coupon or issue.
product
string 
optional
Product code if productSpecType is product, issue code if productSpecType is issue (issue code must exists in Connect).
<= 12 characters
quantity
number 
required
Quantity for this line.
unitPrice
number 
required
Unit price. The currency is given by the order.
Multiple of:
0.01
promotionCode
string 
optional
The promotion code
<= 12 characters
categoryCode
string 
optional
The category code
<= 12 characters
voucherCode
string 
optional
Voucher code for this order.
<= 36 characters
allowAccessProduct
string 
optional
After placing the order, the order will be processed in the backend system. This might take some time due to various error conditions and delays. The request may contain a product, a category type, and a number of seconds the user will be granted temporary access to protected content. If a category type is specified, the temporary access can be restricted to orders on that category type.
If this is an issue order (i.e productSpecType is issue), the issue specified in product field on orderLine must exists for the given product code specified in allowAccessProduct.
<= 12 characters
allowAccessCategoryType
string 
optional
After placing the order, the order will be processed in the backend system. This might take some time due to various error conditions and delays. The request may contain a product, a category type, and a number of seconds the user will be granted temporary access to protected content. If a category type is specified, the temporary access can be restricted to orders on that category type.
If this is an issue order (i.e productSpecType is issue), the issue specified in product field on orderLine must exists for the given product code specified in allowAccessProduct.
<= 12 characters
allowAccessSeconds
integer 
optional
After placing the order, the order will be processed in the backend system. This might take some time due to various error conditions and delays. The request may contain a product, a category type, and a number of seconds the user will be granted temporary access to protected content. If a category type is specified, the temporary access can be restricted to orders on that category type.
If this is an issue order (i.e productSpecType is issue), the issue specified in product field on orderLine must exists for the given product code specified in allowAccessProduct.
startInfo
object 
optional
Object containing one of startDate or startIssue. Not both.
rewardPartnerId
integer 
optional
Id that identifies the partner.
rewardId
string 
optional
Reward id that customer input
<= 36 characters
articleDetail
object 
optional
Object containing information about article purchase. productSpecType = article
receiver
object (Name and address for order) 
optional
recruiter
object (Name and address for order) 
optional
recurring
boolean 
optional
It informs if recurring payment should be done on this order.
true: The recurring payment will be enabled if the payment provider support this and coupon/product allow to do the recurring payment.
false: The recurring payment will not be enabled. For one-time purchase needs to be false.
Default:
true
prepaid
boolean 
optional
It informs if the order is prepaid.
true: The order was prepaid. There is no need to do the payment.
false: The order is not prepaid.
This parameter is optional, in use with paymentInfo details.
Default:
false
paymentInfoKCO
object 
optional
This field is optional, but must be set if paymentMethod = kco, otherwise the request will fail.
recurringToken
string 
optional
A recurring token is a reference ID for using recurring payment from service provide. This is only required if recurring is true.
<= 64 characters
klarnaReference
string 
required
Klarna Reference ID. This is not required if prepaid=false.
<= 12 characters
klarnaOrderId
string 
required
The Klarna unique order ID. This is not required if prepaid=false.
<= 64 characters
merchantId
string 
required
Unique ID that identify the payment provider. If prepaid=false, this is only required field.
<= 64 characters
cardNumberMasked
string 
optional
Masked card number for display
<= 64 characters
cardExpiryDate
string 
optional
Card expiration month and year in format: MM/YYYY
<= 7 characters
cardBrand
string 
optional
Card type name
<= 32 characters
directBankName
string 
optional
Bank name for direct debit
directAccountNumber
string 
optional
The account number used for paying by direct debit.
paymentInfoSmsPay
object 
optional
This field is optional, but must be set if prepaid= true and paymentMethod = sms, otherwise the request will fail.
phoneNumberMasked
string 
optional
The phone number used to pay by SMS. A phone number has to follow the telephone number standard E.164
<= 20 characters
transactionId
string 
required
Id for payment transaction.
<= 40 characters
merchantId
string 
required
Unique ID that identify the payment provider.
<= 64 characters
paymentInfoPayEx
object 
optional
This field is optional, but must be set if prepaid= true and paymentMethod = creditcardPayex, otherwise the request will fail.
transactionId
string 
required
Id for payment transaction.
<= 12 characters
merchantId
string 
required
Unique ID that identify the payment provider.
<= 64 characters
recurrenceToken
string 
optional
A recurrence token is a reference ID for using recurring payment from service provide. This is only required if recurring is true.
<= 12 characters
cardDetails
object 
optional
Details of the card.
orderReference
string 
optional
PayEx order reference.
<= 40 characters
paymentInfoSwishPayEx
object 
optional
This field is optional, but must be set if prepaid= true and paymentMethod = swishPayex, otherwise the request will fail.
transactionId
string 
required
Id for payment transaction generated by Swish
<= 255 characters
merchantId
string 
required
Unique ID that identify the payment provider.
<= 64 characters
phoneNumber
string 
optional
Phone number used for payment.
A phone number has to follow the telephone number standard E.164.
<= 15 characters
transactionSaleId
string 
required
Unique sale transaction id generated by Swish
<= 255 characters
paymentReference
string 
optional
Unique payment reference generated by Swish
<= 64 characters
paymentInfoVippsEcommerce
object 
optional
This field is optional, but must be set if prepaid= true and paymentMethod = vippsEcommerce, otherwise the request will fail.
transactionId
string 
required
Id which uniquely identifies a payment in Vipps(orderId).
<= 50 characters
merchantId
string 
required
Unique ID that identify the payment provider.
<= 64 characters
paymentInfoNexi
object 
optional
This field is optional, but must be set if prepaid= true and paymentMethod = nexi, otherwise the request will fail.
paymentId
string 
required
Unique ID which identifies a payment in Nexi.
<= 64 characters
merchantId
string 
required
Unique ID which identifies a payment provider.
<= 64 characters
subscriptionId
string 
optional
Unique ID which identifies a subscription in Nexi. This is only required if recurring is true and prepaid is true.
<= 64 characters
chargeId
string 
optional
Unique ID which identifies a charge in Nexi.
<= 64 characters
orderReference
string 
optional
Nexi order reference.
<= 40 characters
paymentDetails
object 
optional
Additional information about payment details.
paymentInfoOther
object 
optional
This field is optional, but must be set if prepaid= true and paymentMethod = other, otherwise the request will fail.
transactionId
string 
required
Id for payment transaction.
<= 12 characters
merchantId
string 
required
Unique ID that identify the payment provider.
<= 64 characters
description
string 
optional
Description for payment transaction.
<= 64 characters
mcPayRef
string 
optional
UnitePay (McPay) transaction id. Specify it if the order was prepaid using UnitePay.
shareCode
string 
optional
Share code, the unique key to find given share. When provided order will be treated as B2B order for accepted shared subscription.
<= 255 characters
Examples

Responses

🟢200OK
application/json
OK
Body
orderId
integer 
optional
OrderId for created order.
🟠400Bad Request
🟠429429
🔴500Server Error
Previous
Register customer
Next
Register order
Built with