{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml","api-docs-apis/b2b.json":"api-docs-apis/b2b.json"},"props":{"metadata":{"markdoc":{"tagList":["split","openapi-code-sample","openapi-response-sample"]},"type":"markdown"},"seo":{"title":"B2B API Profile Management Guide","description":"RAI Partners API."},"dynamicMarkdocComponents":["openapi"],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"b2b-api-profile-management-guide","__idx":0},"children":["B2B API Profile Management Guide"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"overview","__idx":1},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Profile Management lets you:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create a profile for each primary and secondary cardholders associated with an account."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["All calls to the endpoint must have a valid JWT Token."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Split","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"create-profiles","__idx":2},"children":["Create profiles"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Only primary and secondary cardholders can have a profile."," ","If a profile already exists for a cardholder the new account will be linked to their existing profile."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"standard-profile-creation","__idx":3},"children":["Standard profile creation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An email will be sent to cardholder to provide / update their password"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["API Call Example:"]}]},{"$$mdtype":"Tag","name":"OpenApiCodeSample","attributes":{"descriptionFile":"api-docs-apis/b2b.json","operationId":"registerProfile","parameters":{},"environments":{},"codeSamplesResolved":[{"lang":"shell","title":"curl","source":"curl -i -X POST \\\n  https://api.raipartners.com/b2b/portal/profile \\\n  -H 'API-Version: 1.0.0' \\\n  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"opa\": \"1234567890123456\",\n    \"primaryCardholder\": {\n      \"name\": {\n        \"first\": \"John\",\n        \"last\": \"Smith\",\n        \"middle\": \"James\"\n      },\n      \"dob\": \"2000-01-31\",\n      \"ssn\": \"123456789\",\n      \"cardNumber\": \"1234567890123456\",\n      \"communications\": {\n        \"mobilePhone\": {\n          \"number\": \"1234567890\",\n          \"verified\": true\n        },\n        \"email\": {\n          \"address\": \"myemail@email.com\",\n          \"verified\": true\n        }\n      },\n      \"address\": {\n        \"line1\": \"1 Main St\",\n        \"line2\": \"Apt 35\",\n        \"city\": \"Dallas\",\n        \"state\": \"TX\",\n        \"zipCode\": \"75000\"\n      },\n      \"income\": {\n        \"amount\": 10000,\n        \"source\": \"Employment\",\n        \"frequency\": \"Yearly\"\n      }\n    },\n    \"secondaryCardholder\": {\n      \"name\": {\n        \"first\": \"John\",\n        \"last\": \"Smith\",\n        \"middle\": \"James\"\n      },\n      \"dob\": \"2000-01-31\",\n      \"ssn\": \"123456789\",\n      \"cardNumber\": \"1234567890123456\",\n      \"communications\": {\n        \"mobilePhone\": {\n          \"number\": \"1234567890\",\n          \"verified\": true\n        },\n        \"email\": {\n          \"address\": \"myemail@email.com\",\n          \"verified\": true\n        }\n      },\n      \"address\": {\n        \"line1\": \"1 Main St\",\n        \"line2\": \"Apt 35\",\n        \"city\": \"Dallas\",\n        \"state\": \"TX\",\n        \"zipCode\": \"75000\"\n      },\n      \"income\": {\n        \"amount\": 10000,\n        \"source\": \"Employment\",\n        \"frequency\": \"Yearly\"\n      }\n    },\n    \"authorizedUsers\": [\n      {\n        \"name\": {\n          \"first\": \"John\",\n          \"last\": \"Smith\",\n          \"middle\": \"James\"\n        },\n        \"dob\": \"2000-01-31\",\n        \"ssn\": \"123456789\",\n        \"cardNumber\": \"1234567890123456\",\n        \"communications\": {\n          \"mobilePhone\": {\n            \"number\": \"1234567890\",\n            \"verified\": true\n          },\n          \"email\": {\n            \"address\": \"myemail@email.com\",\n            \"verified\": true\n          }\n        },\n        \"address\": {\n          \"line1\": \"1 Main St\",\n          \"line2\": \"Apt 35\",\n          \"city\": \"Dallas\",\n          \"state\": \"TX\",\n          \"zipCode\": \"75000\"\n        },\n        \"income\": {\n          \"amount\": 10000,\n          \"source\": \"Employment\",\n          \"frequency\": \"Yearly\"\n        }\n      }\n    ]\n  }'"},{"lang":"javascript","title":"JavaScript","source":"const resp = await fetch(\n  `https://api.raipartners.com/b2b/portal/profile`,\n  {\n    method: 'POST',\n    headers: {\n      'Content-Type': 'application/json',\n      'API-Version': '1.0.0',\n      Authorization: 'Bearer <YOUR_JWT_HERE>'\n    },\n    body: JSON.stringify({\n      opa: '1234567890123456',\n      primaryCardholder: {\n        name: {\n          first: 'John',\n          last: 'Smith',\n          middle: 'James'\n        },\n        dob: '2000-01-31',\n        ssn: '123456789',\n        cardNumber: '1234567890123456',\n        communications: {\n          mobilePhone: {\n            number: '1234567890',\n            verified: true\n          },\n          email: {\n            address: 'myemail@email.com',\n            verified: true\n          }\n        },\n        address: {\n          line1: '1 Main St',\n          line2: 'Apt 35',\n          city: 'Dallas',\n          state: 'TX',\n          zipCode: '75000'\n        },\n        income: {\n          amount: 10000,\n          source: 'Employment',\n          frequency: 'Yearly'\n        }\n      },\n      secondaryCardholder: {\n        name: {\n          first: 'John',\n          last: 'Smith',\n          middle: 'James'\n        },\n        dob: '2000-01-31',\n        ssn: '123456789',\n        cardNumber: '1234567890123456',\n        communications: {\n          mobilePhone: {\n            number: '1234567890',\n            verified: true\n          },\n          email: {\n            address: 'myemail@email.com',\n            verified: true\n          }\n        },\n        address: {\n          line1: '1 Main St',\n          line2: 'Apt 35',\n          city: 'Dallas',\n          state: 'TX',\n          zipCode: '75000'\n        },\n        income: {\n          amount: 10000,\n          source: 'Employment',\n          frequency: 'Yearly'\n        }\n      },\n      authorizedUsers: [\n        {\n          name: {\n            first: 'John',\n            last: 'Smith',\n            middle: 'James'\n          },\n          dob: '2000-01-31',\n          ssn: '123456789',\n          cardNumber: '1234567890123456',\n          communications: {\n            mobilePhone: {\n              number: '1234567890',\n              verified: true\n            },\n            email: {\n              address: 'myemail@email.com',\n              verified: true\n            }\n          },\n          address: {\n            line1: '1 Main St',\n            line2: 'Apt 35',\n            city: 'Dallas',\n            state: 'TX',\n            zipCode: '75000'\n          },\n          income: {\n            amount: 10000,\n            source: 'Employment',\n            frequency: 'Yearly'\n          }\n        }\n      ]\n    })\n  }\n);\n\nif (resp.status === 204) {\n  console.log('success');\n} else {\n  const data = await resp.json();\n  console.log(data);\n}"},{"lang":"javascript","title":"Node.js","source":"import fetch from 'node-fetch';\n\nasync function run() {\n  const resp = await fetch(\n    `https://api.raipartners.com/b2b/portal/profile`,\n    {\n      method: 'POST',\n      headers: {\n        'Content-Type': 'application/json',\n        'API-Version': '1.0.0',\n        Authorization: 'Bearer <YOUR_JWT_HERE>'\n      },\n      body: JSON.stringify({\n        opa: '1234567890123456',\n        primaryCardholder: {\n          name: {\n            first: 'John',\n            last: 'Smith',\n            middle: 'James'\n          },\n          dob: '2000-01-31',\n          ssn: '123456789',\n          cardNumber: '1234567890123456',\n          communications: {\n            mobilePhone: {\n              number: '1234567890',\n              verified: true\n            },\n            email: {\n              address: 'myemail@email.com',\n              verified: true\n            }\n          },\n          address: {\n            line1: '1 Main St',\n            line2: 'Apt 35',\n            city: 'Dallas',\n            state: 'TX',\n            zipCode: '75000'\n          },\n          income: {\n            amount: 10000,\n            source: 'Employment',\n            frequency: 'Yearly'\n          }\n        },\n        secondaryCardholder: {\n          name: {\n            first: 'John',\n            last: 'Smith',\n            middle: 'James'\n          },\n          dob: '2000-01-31',\n          ssn: '123456789',\n          cardNumber: '1234567890123456',\n          communications: {\n            mobilePhone: {\n              number: '1234567890',\n              verified: true\n            },\n            email: {\n              address: 'myemail@email.com',\n              verified: true\n            }\n          },\n          address: {\n            line1: '1 Main St',\n            line2: 'Apt 35',\n            city: 'Dallas',\n            state: 'TX',\n            zipCode: '75000'\n          },\n          income: {\n            amount: 10000,\n            source: 'Employment',\n            frequency: 'Yearly'\n          }\n        },\n        authorizedUsers: [\n          {\n            name: {\n              first: 'John',\n              last: 'Smith',\n              middle: 'James'\n            },\n            dob: '2000-01-31',\n            ssn: '123456789',\n            cardNumber: '1234567890123456',\n            communications: {\n              mobilePhone: {\n                number: '1234567890',\n                verified: true\n              },\n              email: {\n                address: 'myemail@email.com',\n                verified: true\n              }\n            },\n            address: {\n              line1: '1 Main St',\n              line2: 'Apt 35',\n              city: 'Dallas',\n              state: 'TX',\n              zipCode: '75000'\n            },\n            income: {\n              amount: 10000,\n              source: 'Employment',\n              frequency: 'Yearly'\n            }\n          }\n        ]\n      })\n    }\n  );\n\n  if (resp.status === 204) {\n    console.log('success');\n  } else {\n    const data = await resp.json();\n    console.log(data);\n  }\n}\n\nrun();"},{"lang":"python","title":"Python","source":"import requests\n\nurl = \"https://api.raipartners.com/b2b/portal/profile\"\n\npayload = {\n  \"opa\": \"1234567890123456\",\n  \"primaryCardholder\": {\n    \"name\": {\n      \"first\": \"John\",\n      \"last\": \"Smith\",\n      \"middle\": \"James\"\n    },\n    \"dob\": \"2000-01-31\",\n    \"ssn\": \"123456789\",\n    \"cardNumber\": \"1234567890123456\",\n    \"communications\": {\n      \"mobilePhone\": {\n        \"number\": \"1234567890\",\n        \"verified\": True\n      },\n      \"email\": {\n        \"address\": \"myemail@email.com\",\n        \"verified\": True\n      }\n    },\n    \"address\": {\n      \"line1\": \"1 Main St\",\n      \"line2\": \"Apt 35\",\n      \"city\": \"Dallas\",\n      \"state\": \"TX\",\n      \"zipCode\": \"75000\"\n    },\n    \"income\": {\n      \"amount\": 10000,\n      \"source\": \"Employment\",\n      \"frequency\": \"Yearly\"\n    }\n  },\n  \"secondaryCardholder\": {\n    \"name\": {\n      \"first\": \"John\",\n      \"last\": \"Smith\",\n      \"middle\": \"James\"\n    },\n    \"dob\": \"2000-01-31\",\n    \"ssn\": \"123456789\",\n    \"cardNumber\": \"1234567890123456\",\n    \"communications\": {\n      \"mobilePhone\": {\n        \"number\": \"1234567890\",\n        \"verified\": True\n      },\n      \"email\": {\n        \"address\": \"myemail@email.com\",\n        \"verified\": True\n      }\n    },\n    \"address\": {\n      \"line1\": \"1 Main St\",\n      \"line2\": \"Apt 35\",\n      \"city\": \"Dallas\",\n      \"state\": \"TX\",\n      \"zipCode\": \"75000\"\n    },\n    \"income\": {\n      \"amount\": 10000,\n      \"source\": \"Employment\",\n      \"frequency\": \"Yearly\"\n    }\n  },\n  \"authorizedUsers\": [\n    {\n      \"name\": {\n        \"first\": \"John\",\n        \"last\": \"Smith\",\n        \"middle\": \"James\"\n      },\n      \"dob\": \"2000-01-31\",\n      \"ssn\": \"123456789\",\n      \"cardNumber\": \"1234567890123456\",\n      \"communications\": {\n        \"mobilePhone\": {\n          \"number\": \"1234567890\",\n          \"verified\": True\n        },\n        \"email\": {\n          \"address\": \"myemail@email.com\",\n          \"verified\": True\n        }\n      },\n      \"address\": {\n        \"line1\": \"1 Main St\",\n        \"line2\": \"Apt 35\",\n        \"city\": \"Dallas\",\n        \"state\": \"TX\",\n        \"zipCode\": \"75000\"\n      },\n      \"income\": {\n        \"amount\": 10000,\n        \"source\": \"Employment\",\n        \"frequency\": \"Yearly\"\n      }\n    }\n  ]\n}\n\nheaders = {\n  \"Content-Type\": \"application/json\",\n  \"API-Version\": \"1.0.0\",\n  \"Authorization\": \"Bearer <YOUR_JWT_HERE>\"\n}\n\nresponse = requests.post(url, json=payload, headers=headers)\n\nif response.status_code == 204:\n  print(\"success\")\nelse:\n  data = response.json()\n  print(data)"},{"lang":"java","title":"Java","source":"import java.net.*;\nimport java.net.http.*;\nimport java.util.*;\n\npublic class App {\n  public static void main(String[] args) throws Exception {\n    var httpClient = HttpClient.newBuilder().build();\n\n    var payload = String.join(\"\\n\"\n      , \"{\"\n      , \" \\\"opa\\\": \\\"1234567890123456\\\",\"\n      , \" \\\"primaryCardholder\\\": {\"\n      , \"  \\\"name\\\": {\"\n      , \"   \\\"first\\\": \\\"John\\\",\"\n      , \"   \\\"last\\\": \\\"Smith\\\",\"\n      , \"   \\\"middle\\\": \\\"James\\\"\"\n      , \"  },\"\n      , \"  \\\"dob\\\": \\\"2000-01-31\\\",\"\n      , \"  \\\"ssn\\\": \\\"123456789\\\",\"\n      , \"  \\\"cardNumber\\\": \\\"1234567890123456\\\",\"\n      , \"  \\\"communications\\\": {\"\n      , \"   \\\"mobilePhone\\\": {\"\n      , \"    \\\"number\\\": \\\"1234567890\\\",\"\n      , \"    \\\"verified\\\": true\"\n      , \"   },\"\n      , \"   \\\"email\\\": {\"\n      , \"    \\\"address\\\": \\\"myemail@email.com\\\",\"\n      , \"    \\\"verified\\\": true\"\n      , \"   }\"\n      , \"  },\"\n      , \"  \\\"address\\\": {\"\n      , \"   \\\"line1\\\": \\\"1 Main St\\\",\"\n      , \"   \\\"line2\\\": \\\"Apt 35\\\",\"\n      , \"   \\\"city\\\": \\\"Dallas\\\",\"\n      , \"   \\\"state\\\": \\\"TX\\\",\"\n      , \"   \\\"zipCode\\\": \\\"75000\\\"\"\n      , \"  },\"\n      , \"  \\\"income\\\": {\"\n      , \"   \\\"amount\\\": 10000,\"\n      , \"   \\\"source\\\": \\\"Employment\\\",\"\n      , \"   \\\"frequency\\\": \\\"Yearly\\\"\"\n      , \"  }\"\n      , \" },\"\n      , \" \\\"secondaryCardholder\\\": {\"\n      , \"  \\\"name\\\": {\"\n      , \"   \\\"first\\\": \\\"John\\\",\"\n      , \"   \\\"last\\\": \\\"Smith\\\",\"\n      , \"   \\\"middle\\\": \\\"James\\\"\"\n      , \"  },\"\n      , \"  \\\"dob\\\": \\\"2000-01-31\\\",\"\n      , \"  \\\"ssn\\\": \\\"123456789\\\",\"\n      , \"  \\\"cardNumber\\\": \\\"1234567890123456\\\",\"\n      , \"  \\\"communications\\\": {\"\n      , \"   \\\"mobilePhone\\\": {\"\n      , \"    \\\"number\\\": \\\"1234567890\\\",\"\n      , \"    \\\"verified\\\": true\"\n      , \"   },\"\n      , \"   \\\"email\\\": {\"\n      , \"    \\\"address\\\": \\\"myemail@email.com\\\",\"\n      , \"    \\\"verified\\\": true\"\n      , \"   }\"\n      , \"  },\"\n      , \"  \\\"address\\\": {\"\n      , \"   \\\"line1\\\": \\\"1 Main St\\\",\"\n      , \"   \\\"line2\\\": \\\"Apt 35\\\",\"\n      , \"   \\\"city\\\": \\\"Dallas\\\",\"\n      , \"   \\\"state\\\": \\\"TX\\\",\"\n      , \"   \\\"zipCode\\\": \\\"75000\\\"\"\n      , \"  },\"\n      , \"  \\\"income\\\": {\"\n      , \"   \\\"amount\\\": 10000,\"\n      , \"   \\\"source\\\": \\\"Employment\\\",\"\n      , \"   \\\"frequency\\\": \\\"Yearly\\\"\"\n      , \"  }\"\n      , \" },\"\n      , \" \\\"authorizedUsers\\\": [\"\n      , \"  {\"\n      , \"   \\\"name\\\": {\"\n      , \"    \\\"first\\\": \\\"John\\\",\"\n      , \"    \\\"last\\\": \\\"Smith\\\",\"\n      , \"    \\\"middle\\\": \\\"James\\\"\"\n      , \"   },\"\n      , \"   \\\"dob\\\": \\\"2000-01-31\\\",\"\n      , \"   \\\"ssn\\\": \\\"123456789\\\",\"\n      , \"   \\\"cardNumber\\\": \\\"1234567890123456\\\",\"\n      , \"   \\\"communications\\\": {\"\n      , \"    \\\"mobilePhone\\\": {\"\n      , \"     \\\"number\\\": \\\"1234567890\\\",\"\n      , \"     \\\"verified\\\": true\"\n      , \"    },\"\n      , \"    \\\"email\\\": {\"\n      , \"     \\\"address\\\": \\\"myemail@email.com\\\",\"\n      , \"     \\\"verified\\\": true\"\n      , \"    }\"\n      , \"   },\"\n      , \"   \\\"address\\\": {\"\n      , \"    \\\"line1\\\": \\\"1 Main St\\\",\"\n      , \"    \\\"line2\\\": \\\"Apt 35\\\",\"\n      , \"    \\\"city\\\": \\\"Dallas\\\",\"\n      , \"    \\\"state\\\": \\\"TX\\\",\"\n      , \"    \\\"zipCode\\\": \\\"75000\\\"\"\n      , \"   },\"\n      , \"   \\\"income\\\": {\"\n      , \"    \\\"amount\\\": 10000,\"\n      , \"    \\\"source\\\": \\\"Employment\\\",\"\n      , \"    \\\"frequency\\\": \\\"Yearly\\\"\"\n      , \"   }\"\n      , \"  }\"\n      , \" ]\"\n      , \"}\"\n    );\n\n    var host = \"https://api.raipartners.com\";\n    var pathname = \"/b2b/portal/profile\";\n    var request = HttpRequest.newBuilder()\n      .POST(HttpRequest.BodyPublishers.ofString(payload))\n      .uri(URI.create(host + pathname ))\n      .header(\"Content-Type\", \"application/json\")\n      .header(\"API-Version\", \"1.0.0\")\n      .header(\"Authorization\", \"Bearer <YOUR_JWT_HERE>\")\n      .build();\n\n    var response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());\n\n    System.out.println(response.body());\n  }\n}"},{"lang":"csharp","title":"C#","source":"using System;\nusing System.Net.Http;\nusing System.Threading.Tasks;\nusing System.Text;\nusing System.Text.Json;\n\npublic class Program\n{\n  public static async Task Main()\n  {\n    System.Net.Http.HttpClient client = new()\n    {\n      DefaultRequestHeaders =\n      {\n        {\"API-Version\", \"1.0.0\"},\n        {\"Authorization\", \"Bearer <YOUR_JWT_HERE>\"},\n      }\n    };\n\n    string json = JsonSerializer.Serialize(new\n    {\n      opa = \"1234567890123456\",\n      primaryCardholder = new {\n        name = new {\n          first = \"John\",\n          last = \"Smith\",\n          middle = \"James\"\n        },\n        dob = \"2000-01-31\",\n        ssn = \"123456789\",\n        cardNumber = \"1234567890123456\",\n        communications = new {\n          mobilePhone = new {\n            number = \"1234567890\",\n            verified = \"true\"\n          },\n          email = new {\n            address = \"myemail@email.com\",\n            verified = \"true\"\n          }\n        },\n        address = new {\n          line1 = \"1 Main St\",\n          line2 = \"Apt 35\",\n          city = \"Dallas\",\n          state = \"TX\",\n          zipCode = \"75000\"\n        },\n        income = new {\n          amount = \"10000\",\n          source = \"Employment\",\n          frequency = \"Yearly\"\n        }\n      },\n      secondaryCardholder = new {\n        name = new {\n          first = \"John\",\n          last = \"Smith\",\n          middle = \"James\"\n        },\n        dob = \"2000-01-31\",\n        ssn = \"123456789\",\n        cardNumber = \"1234567890123456\",\n        communications = new {\n          mobilePhone = new {\n            number = \"1234567890\",\n            verified = \"true\"\n          },\n          email = new {\n            address = \"myemail@email.com\",\n            verified = \"true\"\n          }\n        },\n        address = new {\n          line1 = \"1 Main St\",\n          line2 = \"Apt 35\",\n          city = \"Dallas\",\n          state = \"TX\",\n          zipCode = \"75000\"\n        },\n        income = new {\n          amount = \"10000\",\n          source = \"Employment\",\n          frequency = \"Yearly\"\n        }\n      },\n      authorizedUsers = new[] {\n        new {\n          name = new {\n            first = \"John\",\n            last = \"Smith\",\n            middle = \"James\"\n          },\n          dob = \"2000-01-31\",\n          ssn = \"123456789\",\n          cardNumber = \"1234567890123456\",\n          communications = new {\n            mobilePhone = new {\n              number = \"1234567890\",\n              verified = \"true\"\n            },\n            email = new {\n              address = \"myemail@email.com\",\n              verified = \"true\"\n            }\n          },\n          address = new {\n            line1 = \"1 Main St\",\n            line2 = \"Apt 35\",\n            city = \"Dallas\",\n            state = \"TX\",\n            zipCode = \"75000\"\n          },\n          income = new {\n            amount = \"10000\",\n            source = \"Employment\",\n            frequency = \"Yearly\"\n          }\n        }\n      },\n    });\n\n    using StringContent postData = new(json, Encoding.UTF8, \"application/json\");\n    using HttpResponseMessage request = await client.PostAsync(\"https://api.raipartners.com/b2b/portal/profile\", postData);\n    string response = await request.Content.ReadAsStringAsync();\n\n    Console.WriteLine(response);\n  }\n}"},{"lang":"php","title":"PHP","source":"/**\n * Requires libcurl\n */\n\n$curl = curl_init();\n\n$payload = array(\n  \"opa\" => \"1234567890123456\",\n  \"primaryCardholder\" => array(\n    \"name\" => array(\n      \"first\" => \"John\",\n      \"last\" => \"Smith\",\n      \"middle\" => \"James\"\n    ),\n    \"dob\" => \"2000-01-31\",\n    \"ssn\" => \"123456789\",\n    \"cardNumber\" => \"1234567890123456\",\n    \"communications\" => array(\n      \"mobilePhone\" => array(\n        \"number\" => \"1234567890\",\n        \"verified\" => true\n      ),\n      \"email\" => array(\n        \"address\" => \"myemail@email.com\",\n        \"verified\" => true\n      )\n    ),\n    \"address\" => array(\n      \"line1\" => \"1 Main St\",\n      \"line2\" => \"Apt 35\",\n      \"city\" => \"Dallas\",\n      \"state\" => \"TX\",\n      \"zipCode\" => \"75000\"\n    ),\n    \"income\" => array(\n      \"amount\" => 10000,\n      \"source\" => \"Employment\",\n      \"frequency\" => \"Yearly\"\n    )\n  ),\n  \"secondaryCardholder\" => array(\n    \"name\" => array(\n      \"first\" => \"John\",\n      \"last\" => \"Smith\",\n      \"middle\" => \"James\"\n    ),\n    \"dob\" => \"2000-01-31\",\n    \"ssn\" => \"123456789\",\n    \"cardNumber\" => \"1234567890123456\",\n    \"communications\" => array(\n      \"mobilePhone\" => array(\n        \"number\" => \"1234567890\",\n        \"verified\" => true\n      ),\n      \"email\" => array(\n        \"address\" => \"myemail@email.com\",\n        \"verified\" => true\n      )\n    ),\n    \"address\" => array(\n      \"line1\" => \"1 Main St\",\n      \"line2\" => \"Apt 35\",\n      \"city\" => \"Dallas\",\n      \"state\" => \"TX\",\n      \"zipCode\" => \"75000\"\n    ),\n    \"income\" => array(\n      \"amount\" => 10000,\n      \"source\" => \"Employment\",\n      \"frequency\" => \"Yearly\"\n    )\n  ),\n  \"authorizedUsers\" => array(\n    array(\n      \"name\" => array(\n        \"first\" => \"John\",\n        \"last\" => \"Smith\",\n        \"middle\" => \"James\"\n      ),\n      \"dob\" => \"2000-01-31\",\n      \"ssn\" => \"123456789\",\n      \"cardNumber\" => \"1234567890123456\",\n      \"communications\" => array(\n        \"mobilePhone\" => array(\n          \"number\" => \"1234567890\",\n          \"verified\" => true\n        ),\n        \"email\" => array(\n          \"address\" => \"myemail@email.com\",\n          \"verified\" => true\n        )\n      ),\n      \"address\" => array(\n        \"line1\" => \"1 Main St\",\n        \"line2\" => \"Apt 35\",\n        \"city\" => \"Dallas\",\n        \"state\" => \"TX\",\n        \"zipCode\" => \"75000\"\n      ),\n      \"income\" => array(\n        \"amount\" => 10000,\n        \"source\" => \"Employment\",\n        \"frequency\" => \"Yearly\"\n      )\n    )\n  )\n);\n\ncurl_setopt_array($curl, [\n  CURLOPT_HTTPHEADER => [\n    \"API-Version: 1.0.0\",\n    \"Authorization: Bearer <YOUR_JWT_HERE>\",\n    \"Content-Type: application/json\"\n  ],\n  CURLOPT_POSTFIELDS => json_encode($payload),\n  CURLOPT_URL => \"https://api.raipartners.com/b2b/portal/profile\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n]);\n\n$response = curl_exec($curl);\n$error = curl_error($curl);\n\ncurl_close($curl);\n\nif ($error) {\n  echo \"cURL Error #:\" . $error;\n} else {\n  echo $response;\n}"},{"lang":"go","title":"Go","source":"package main\n\nimport (\n  \"fmt\"\n  \"bytes\"\n  \"net/http\"\n  \"io/ioutil\"\n)\n\nfunc main() {\n  reqUrl := \"https://api.raipartners.com/b2b/portal/profile\"\n  var data = []byte(`{\n    \"opa\": \"1234567890123456\",\n    \"primaryCardholder\": {\n      \"name\": {\n        \"first\": \"John\",\n        \"last\": \"Smith\",\n        \"middle\": \"James\"\n      },\n      \"dob\": \"2000-01-31\",\n      \"ssn\": \"123456789\",\n      \"cardNumber\": \"1234567890123456\",\n      \"communications\": {\n        \"mobilePhone\": {\n          \"number\": \"1234567890\",\n          \"verified\": true\n        },\n        \"email\": {\n          \"address\": \"myemail@email.com\",\n          \"verified\": true\n        }\n      },\n      \"address\": {\n        \"line1\": \"1 Main St\",\n        \"line2\": \"Apt 35\",\n        \"city\": \"Dallas\",\n        \"state\": \"TX\",\n        \"zipCode\": \"75000\"\n      },\n      \"income\": {\n        \"amount\": 10000,\n        \"source\": \"Employment\",\n        \"frequency\": \"Yearly\"\n      }\n    },\n    \"secondaryCardholder\": {\n      \"name\": {\n        \"first\": \"John\",\n        \"last\": \"Smith\",\n        \"middle\": \"James\"\n      },\n      \"dob\": \"2000-01-31\",\n      \"ssn\": \"123456789\",\n      \"cardNumber\": \"1234567890123456\",\n      \"communications\": {\n        \"mobilePhone\": {\n          \"number\": \"1234567890\",\n          \"verified\": true\n        },\n        \"email\": {\n          \"address\": \"myemail@email.com\",\n          \"verified\": true\n        }\n      },\n      \"address\": {\n        \"line1\": \"1 Main St\",\n        \"line2\": \"Apt 35\",\n        \"city\": \"Dallas\",\n        \"state\": \"TX\",\n        \"zipCode\": \"75000\"\n      },\n      \"income\": {\n        \"amount\": 10000,\n        \"source\": \"Employment\",\n        \"frequency\": \"Yearly\"\n      }\n    },\n    \"authorizedUsers\": [\n      {\n        \"name\": {\n          \"first\": \"John\",\n          \"last\": \"Smith\",\n          \"middle\": \"James\"\n        },\n        \"dob\": \"2000-01-31\",\n        \"ssn\": \"123456789\",\n        \"cardNumber\": \"1234567890123456\",\n        \"communications\": {\n          \"mobilePhone\": {\n            \"number\": \"1234567890\",\n            \"verified\": true\n          },\n          \"email\": {\n            \"address\": \"myemail@email.com\",\n            \"verified\": true\n          }\n        },\n        \"address\": {\n          \"line1\": \"1 Main St\",\n          \"line2\": \"Apt 35\",\n          \"city\": \"Dallas\",\n          \"state\": \"TX\",\n          \"zipCode\": \"75000\"\n        },\n        \"income\": {\n          \"amount\": 10000,\n          \"source\": \"Employment\",\n          \"frequency\": \"Yearly\"\n        }\n      }\n    ]\n  }`)\n  req, err := http.NewRequest(\"POST\", reqUrl, bytes.NewBuffer(data))\n  if err != nil {\n    panic(err)\n  }\n  req.Header.Add(\"Content-Type\", \"application/json\")\n  req.Header.Add(\"API-Version\", \"1.0.0\")\n  req.Header.Add(\"Authorization\", \"Bearer <YOUR_JWT_HERE>\")\n  res, err := http.DefaultClient.Do(req)\n  if err != nil {\n    panic(err)\n  }\n  defer res.Body.Close()\n  body, err := ioutil.ReadAll(res.Body)\n  if err != nil {\n    panic(err)\n  }\n\n  fmt.Println(res)\n  fmt.Println(string(body))\n}"},{"lang":"ruby","title":"Ruby","source":"require 'json'\nrequire 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI('https://api.raipartners.com/b2b/portal/profile')\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest['Content-Type'] = 'application/json'\nrequest['API-Version'] = '1.0.0'\nrequest['Authorization'] = 'Bearer <YOUR_JWT_HERE>'\nrequest.body = {\n  opa: '1234567890123456',\n  primaryCardholder: {\n    name: {\n      first: 'John',\n      last: 'Smith',\n      middle: 'James'\n    },\n    dob: '2000-01-31',\n    ssn: '123456789',\n    cardNumber: '1234567890123456',\n    communications: {\n      mobilePhone: {\n        number: '1234567890',\n        verified: true\n      },\n      email: {\n        address: 'myemail@email.com',\n        verified: true\n      }\n    },\n    address: {\n      line1: '1 Main St',\n      line2: 'Apt 35',\n      city: 'Dallas',\n      state: 'TX',\n      zipCode: '75000'\n    },\n    income: {\n      amount: 10000,\n      source: 'Employment',\n      frequency: 'Yearly'\n    }\n  },\n  secondaryCardholder: {\n    name: {\n      first: 'John',\n      last: 'Smith',\n      middle: 'James'\n    },\n    dob: '2000-01-31',\n    ssn: '123456789',\n    cardNumber: '1234567890123456',\n    communications: {\n      mobilePhone: {\n        number: '1234567890',\n        verified: true\n      },\n      email: {\n        address: 'myemail@email.com',\n        verified: true\n      }\n    },\n    address: {\n      line1: '1 Main St',\n      line2: 'Apt 35',\n      city: 'Dallas',\n      state: 'TX',\n      zipCode: '75000'\n    },\n    income: {\n      amount: 10000,\n      source: 'Employment',\n      frequency: 'Yearly'\n    }\n  },\n  authorizedUsers: [\n    {\n      name: {\n        first: 'John',\n        last: 'Smith',\n        middle: 'James'\n      },\n      dob: '2000-01-31',\n      ssn: '123456789',\n      cardNumber: '1234567890123456',\n      communications: {\n        mobilePhone: {\n          number: '1234567890',\n          verified: true\n        },\n        email: {\n          address: 'myemail@email.com',\n          verified: true\n        }\n      },\n      address: {\n        line1: '1 Main St',\n        line2: 'Apt 35',\n        city: 'Dallas',\n        state: 'TX',\n        zipCode: '75000'\n      },\n      income: {\n        amount: 10000,\n        source: 'Employment',\n        frequency: 'Yearly'\n      }\n    }\n  ]\n}.to_json\n\nresponse = http.request(request)\nputs response.read_body\n"},{"lang":"r","title":"R","source":"library(httr)\n\nbody = '{\n   \"opa\": \"1234567890123456\",\n   \"primaryCardholder\": {\n    \"name\": {\n     \"first\": \"John\",\n     \"last\": \"Smith\",\n     \"middle\": \"James\"\n    },\n    \"dob\": \"2000-01-31\",\n    \"ssn\": \"123456789\",\n    \"cardNumber\": \"1234567890123456\",\n    \"communications\": {\n     \"mobilePhone\": {\n      \"number\": \"1234567890\",\n      \"verified\": true\n     },\n     \"email\": {\n      \"address\": \"myemail@email.com\",\n      \"verified\": true\n     }\n    },\n    \"address\": {\n     \"line1\": \"1 Main St\",\n     \"line2\": \"Apt 35\",\n     \"city\": \"Dallas\",\n     \"state\": \"TX\",\n     \"zipCode\": \"75000\"\n    },\n    \"income\": {\n     \"amount\": 10000,\n     \"source\": \"Employment\",\n     \"frequency\": \"Yearly\"\n    }\n   },\n   \"secondaryCardholder\": {\n    \"name\": {\n     \"first\": \"John\",\n     \"last\": \"Smith\",\n     \"middle\": \"James\"\n    },\n    \"dob\": \"2000-01-31\",\n    \"ssn\": \"123456789\",\n    \"cardNumber\": \"1234567890123456\",\n    \"communications\": {\n     \"mobilePhone\": {\n      \"number\": \"1234567890\",\n      \"verified\": true\n     },\n     \"email\": {\n      \"address\": \"myemail@email.com\",\n      \"verified\": true\n     }\n    },\n    \"address\": {\n     \"line1\": \"1 Main St\",\n     \"line2\": \"Apt 35\",\n     \"city\": \"Dallas\",\n     \"state\": \"TX\",\n     \"zipCode\": \"75000\"\n    },\n    \"income\": {\n     \"amount\": 10000,\n     \"source\": \"Employment\",\n     \"frequency\": \"Yearly\"\n    }\n   },\n   \"authorizedUsers\": [\n    {\n     \"name\": {\n      \"first\": \"John\",\n      \"last\": \"Smith\",\n      \"middle\": \"James\"\n     },\n     \"dob\": \"2000-01-31\",\n     \"ssn\": \"123456789\",\n     \"cardNumber\": \"1234567890123456\",\n     \"communications\": {\n      \"mobilePhone\": {\n       \"number\": \"1234567890\",\n       \"verified\": true\n      },\n      \"email\": {\n       \"address\": \"myemail@email.com\",\n       \"verified\": true\n      }\n     },\n     \"address\": {\n      \"line1\": \"1 Main St\",\n      \"line2\": \"Apt 35\",\n      \"city\": \"Dallas\",\n      \"state\": \"TX\",\n      \"zipCode\": \"75000\"\n     },\n     \"income\": {\n      \"amount\": 10000,\n      \"source\": \"Employment\",\n      \"frequency\": \"Yearly\"\n     }\n    }\n   ]\n}'\n\nurl = \"https://api.raipartners.com/b2b/portal/profile\"\n\ndata_req <- POST(\n  url,\n  add_headers(\"Content-Type\" = \"application/json\", \"API-Version\" = \"1.0.0\", \"Authorization\" = \"Bearer <YOUR_JWT_HERE>\"),\n  body = body,\n  encode = \"json\",\n  verbose()\n)\n\ncontent(data_req)"},{"lang":"json","title":"Payload application/json","source":"{\n  \"opa\": \"1234567890123456\",\n  \"primaryCardholder\": {\n    \"name\": {\n      \"first\": \"John\",\n      \"last\": \"Smith\",\n      \"middle\": \"James\"\n    },\n    \"dob\": \"2000-01-31\",\n    \"ssn\": \"123456789\",\n    \"cardNumber\": \"1234567890123456\",\n    \"communications\": {\n      \"mobilePhone\": {\n        \"number\": \"1234567890\",\n        \"verified\": true\n      },\n      \"email\": {\n        \"address\": \"myemail@email.com\",\n        \"verified\": true\n      }\n    },\n    \"address\": {\n      \"line1\": \"1 Main St\",\n      \"line2\": \"Apt 35\",\n      \"city\": \"Dallas\",\n      \"state\": \"TX\",\n      \"zipCode\": \"75000\"\n    },\n    \"income\": {\n      \"amount\": 10000,\n      \"source\": \"Employment\",\n      \"frequency\": \"Yearly\"\n    }\n  },\n  \"secondaryCardholder\": {\n    \"name\": {\n      \"first\": \"John\",\n      \"last\": \"Smith\",\n      \"middle\": \"James\"\n    },\n    \"dob\": \"2000-01-31\",\n    \"ssn\": \"123456789\",\n    \"cardNumber\": \"1234567890123456\",\n    \"communications\": {\n      \"mobilePhone\": {\n        \"number\": \"1234567890\",\n        \"verified\": true\n      },\n      \"email\": {\n        \"address\": \"myemail@email.com\",\n        \"verified\": true\n      }\n    },\n    \"address\": {\n      \"line1\": \"1 Main St\",\n      \"line2\": \"Apt 35\",\n      \"city\": \"Dallas\",\n      \"state\": \"TX\",\n      \"zipCode\": \"75000\"\n    },\n    \"income\": {\n      \"amount\": 10000,\n      \"source\": \"Employment\",\n      \"frequency\": \"Yearly\"\n    }\n  },\n  \"authorizedUsers\": [\n    {\n      \"name\": {\n        \"first\": \"John\",\n        \"last\": \"Smith\",\n        \"middle\": \"James\"\n      },\n      \"dob\": \"2000-01-31\",\n      \"ssn\": \"123456789\",\n      \"cardNumber\": \"1234567890123456\",\n      \"communications\": {\n        \"mobilePhone\": {\n          \"number\": \"1234567890\",\n          \"verified\": true\n        },\n        \"email\": {\n          \"address\": \"myemail@email.com\",\n          \"verified\": true\n        }\n      },\n      \"address\": {\n        \"line1\": \"1 Main St\",\n        \"line2\": \"Apt 35\",\n        \"city\": \"Dallas\",\n        \"state\": \"TX\",\n        \"zipCode\": \"75000\"\n      },\n      \"income\": {\n        \"amount\": 10000,\n        \"source\": \"Employment\",\n        \"frequency\": \"Yearly\"\n      }\n    }\n  ]\n}"}]},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["API Call Response:"]}," ","This endpoint returns a 204 status upon success (no content is returned)"]},{"$$mdtype":"Tag","name":"OpenApiResponseSample","attributes":{"descriptionFile":"api-docs-apis/b2b.json","operationId":"registerProfile","responseSamplesResolved":[{"lang":"json","title":"400 application/json","source":"{\n  \"type\": \"urn:raipartners:api:b2b:errors:validation:invalid-data\",\n  \"title\": \"Bad Request\",\n  \"status\": 400,\n  \"detail\": \"One or more fields are invalid.\"\n}"},{"lang":"json","title":"401 application/json","source":"{\n  \"type\": \"urn:raipartners:api:b2b:errors:authorization:unauthorized\",\n  \"title\": \"Unauthorized\",\n  \"status\": 401,\n  \"detail\": \"You are not authorized to perform this action.\"\n}"},{"lang":"json","title":"403 application/json","source":"{\n  \"type\": \"urn:raipartners:api:b2b:errors:authorization:forbidden\",\n  \"title\": \"Forbidden\",\n  \"status\": 403,\n  \"detail\": \"You are forbidden to perform this action.\"\n}"},{"lang":"json","title":"404 application/json","source":"{\n  \"type\": \"urn:raipartners:api:b2b:errors:not-found\",\n  \"title\": \"Not Found\",\n  \"status\": 404,\n  \"detail\": \"Resource not found.\"\n}"},{"lang":"json","title":"500 application/json","source":"{\n  \"type\": \"urn:raipartners:api:b2b:errors:internal\",\n  \"title\": \"Internal Server Error\",\n  \"status\": 500,\n  \"detail\": \"An unexpected error occurred.\"\n}"},{"lang":"json","title":"503 application/json","source":"{\n  \"type\": \"urn:raipartners:api:b2b:errors:internal\",\n  \"title\": \"Service unavailable Error\",\n  \"status\": 503,\n  \"detail\": \"Service is unavailable.\"\n}"}]},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"profile-creation-with-instant-login-link","__idx":4},"children":["Profile creation with instant login link"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A magic-link allowing for the primary cardholder to to login instantly is returned as a payload."," ","If a secondary cardholder exists, a magic-link will be emailed to that secondary cardholder."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["API Call Example:"]}]},{"$$mdtype":"Tag","name":"OpenApiCodeSample","attributes":{"descriptionFile":"api-docs-apis/b2b.json","operationId":"registerProfileMagicLink","parameters":{},"environments":{},"codeSamplesResolved":[{"lang":"shell","title":"curl","source":"curl -i -X POST \\\n  https://api.raipartners.com/b2b/portal/profile/magic-link \\\n  -H 'API-Version: 1.0.0' \\\n  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"opa\": \"1234567890123456\",\n    \"primaryCardholder\": {\n      \"name\": {\n        \"first\": \"John\",\n        \"last\": \"Smith\",\n        \"middle\": \"James\"\n      },\n      \"dob\": \"2000-01-31\",\n      \"ssn\": \"123456789\",\n      \"cardNumber\": \"1234567890123456\",\n      \"communications\": {\n        \"mobilePhone\": {\n          \"number\": \"1234567890\",\n          \"verified\": true\n        },\n        \"email\": {\n          \"address\": \"myemail@email.com\",\n          \"verified\": true\n        }\n      },\n      \"address\": {\n        \"line1\": \"1 Main St\",\n        \"line2\": \"Apt 35\",\n        \"city\": \"Dallas\",\n        \"state\": \"TX\",\n        \"zipCode\": \"75000\"\n      },\n      \"income\": {\n        \"amount\": 10000,\n        \"source\": \"Employment\",\n        \"frequency\": \"Yearly\"\n      }\n    },\n    \"secondaryCardholder\": {\n      \"name\": {\n        \"first\": \"John\",\n        \"last\": \"Smith\",\n        \"middle\": \"James\"\n      },\n      \"dob\": \"2000-01-31\",\n      \"ssn\": \"123456789\",\n      \"cardNumber\": \"1234567890123456\",\n      \"communications\": {\n        \"mobilePhone\": {\n          \"number\": \"1234567890\",\n          \"verified\": true\n        },\n        \"email\": {\n          \"address\": \"myemail@email.com\",\n          \"verified\": true\n        }\n      },\n      \"address\": {\n        \"line1\": \"1 Main St\",\n        \"line2\": \"Apt 35\",\n        \"city\": \"Dallas\",\n        \"state\": \"TX\",\n        \"zipCode\": \"75000\"\n      },\n      \"income\": {\n        \"amount\": 10000,\n        \"source\": \"Employment\",\n        \"frequency\": \"Yearly\"\n      }\n    },\n    \"authorizedUsers\": [\n      {\n        \"name\": {\n          \"first\": \"John\",\n          \"last\": \"Smith\",\n          \"middle\": \"James\"\n        },\n        \"dob\": \"2000-01-31\",\n        \"ssn\": \"123456789\",\n        \"cardNumber\": \"1234567890123456\",\n        \"communications\": {\n          \"mobilePhone\": {\n            \"number\": \"1234567890\",\n            \"verified\": true\n          },\n          \"email\": {\n            \"address\": \"myemail@email.com\",\n            \"verified\": true\n          }\n        },\n        \"address\": {\n          \"line1\": \"1 Main St\",\n          \"line2\": \"Apt 35\",\n          \"city\": \"Dallas\",\n          \"state\": \"TX\",\n          \"zipCode\": \"75000\"\n        },\n        \"income\": {\n          \"amount\": 10000,\n          \"source\": \"Employment\",\n          \"frequency\": \"Yearly\"\n        }\n      }\n    ]\n  }'"},{"lang":"javascript","title":"JavaScript","source":"const resp = await fetch(\n  `https://api.raipartners.com/b2b/portal/profile/magic-link`,\n  {\n    method: 'POST',\n    headers: {\n      'Content-Type': 'application/json',\n      'API-Version': '1.0.0',\n      Authorization: 'Bearer <YOUR_JWT_HERE>'\n    },\n    body: JSON.stringify({\n      opa: '1234567890123456',\n      primaryCardholder: {\n        name: {\n          first: 'John',\n          last: 'Smith',\n          middle: 'James'\n        },\n        dob: '2000-01-31',\n        ssn: '123456789',\n        cardNumber: '1234567890123456',\n        communications: {\n          mobilePhone: {\n            number: '1234567890',\n            verified: true\n          },\n          email: {\n            address: 'myemail@email.com',\n            verified: true\n          }\n        },\n        address: {\n          line1: '1 Main St',\n          line2: 'Apt 35',\n          city: 'Dallas',\n          state: 'TX',\n          zipCode: '75000'\n        },\n        income: {\n          amount: 10000,\n          source: 'Employment',\n          frequency: 'Yearly'\n        }\n      },\n      secondaryCardholder: {\n        name: {\n          first: 'John',\n          last: 'Smith',\n          middle: 'James'\n        },\n        dob: '2000-01-31',\n        ssn: '123456789',\n        cardNumber: '1234567890123456',\n        communications: {\n          mobilePhone: {\n            number: '1234567890',\n            verified: true\n          },\n          email: {\n            address: 'myemail@email.com',\n            verified: true\n          }\n        },\n        address: {\n          line1: '1 Main St',\n          line2: 'Apt 35',\n          city: 'Dallas',\n          state: 'TX',\n          zipCode: '75000'\n        },\n        income: {\n          amount: 10000,\n          source: 'Employment',\n          frequency: 'Yearly'\n        }\n      },\n      authorizedUsers: [\n        {\n          name: {\n            first: 'John',\n            last: 'Smith',\n            middle: 'James'\n          },\n          dob: '2000-01-31',\n          ssn: '123456789',\n          cardNumber: '1234567890123456',\n          communications: {\n            mobilePhone: {\n              number: '1234567890',\n              verified: true\n            },\n            email: {\n              address: 'myemail@email.com',\n              verified: true\n            }\n          },\n          address: {\n            line1: '1 Main St',\n            line2: 'Apt 35',\n            city: 'Dallas',\n            state: 'TX',\n            zipCode: '75000'\n          },\n          income: {\n            amount: 10000,\n            source: 'Employment',\n            frequency: 'Yearly'\n          }\n        }\n      ]\n    })\n  }\n);\n\nconst data = await resp.json();\nconsole.log(data);"},{"lang":"javascript","title":"Node.js","source":"import fetch from 'node-fetch';\n\nasync function run() {\n  const resp = await fetch(\n    `https://api.raipartners.com/b2b/portal/profile/magic-link`,\n    {\n      method: 'POST',\n      headers: {\n        'Content-Type': 'application/json',\n        'API-Version': '1.0.0',\n        Authorization: 'Bearer <YOUR_JWT_HERE>'\n      },\n      body: JSON.stringify({\n        opa: '1234567890123456',\n        primaryCardholder: {\n          name: {\n            first: 'John',\n            last: 'Smith',\n            middle: 'James'\n          },\n          dob: '2000-01-31',\n          ssn: '123456789',\n          cardNumber: '1234567890123456',\n          communications: {\n            mobilePhone: {\n              number: '1234567890',\n              verified: true\n            },\n            email: {\n              address: 'myemail@email.com',\n              verified: true\n            }\n          },\n          address: {\n            line1: '1 Main St',\n            line2: 'Apt 35',\n            city: 'Dallas',\n            state: 'TX',\n            zipCode: '75000'\n          },\n          income: {\n            amount: 10000,\n            source: 'Employment',\n            frequency: 'Yearly'\n          }\n        },\n        secondaryCardholder: {\n          name: {\n            first: 'John',\n            last: 'Smith',\n            middle: 'James'\n          },\n          dob: '2000-01-31',\n          ssn: '123456789',\n          cardNumber: '1234567890123456',\n          communications: {\n            mobilePhone: {\n              number: '1234567890',\n              verified: true\n            },\n            email: {\n              address: 'myemail@email.com',\n              verified: true\n            }\n          },\n          address: {\n            line1: '1 Main St',\n            line2: 'Apt 35',\n            city: 'Dallas',\n            state: 'TX',\n            zipCode: '75000'\n          },\n          income: {\n            amount: 10000,\n            source: 'Employment',\n            frequency: 'Yearly'\n          }\n        },\n        authorizedUsers: [\n          {\n            name: {\n              first: 'John',\n              last: 'Smith',\n              middle: 'James'\n            },\n            dob: '2000-01-31',\n            ssn: '123456789',\n            cardNumber: '1234567890123456',\n            communications: {\n              mobilePhone: {\n                number: '1234567890',\n                verified: true\n              },\n              email: {\n                address: 'myemail@email.com',\n                verified: true\n              }\n            },\n            address: {\n              line1: '1 Main St',\n              line2: 'Apt 35',\n              city: 'Dallas',\n              state: 'TX',\n              zipCode: '75000'\n            },\n            income: {\n              amount: 10000,\n              source: 'Employment',\n              frequency: 'Yearly'\n            }\n          }\n        ]\n      })\n    }\n  );\n\n  const data = await resp.json();\n  console.log(data);\n}\n\nrun();"},{"lang":"python","title":"Python","source":"import requests\n\nurl = \"https://api.raipartners.com/b2b/portal/profile/magic-link\"\n\npayload = {\n  \"opa\": \"1234567890123456\",\n  \"primaryCardholder\": {\n    \"name\": {\n      \"first\": \"John\",\n      \"last\": \"Smith\",\n      \"middle\": \"James\"\n    },\n    \"dob\": \"2000-01-31\",\n    \"ssn\": \"123456789\",\n    \"cardNumber\": \"1234567890123456\",\n    \"communications\": {\n      \"mobilePhone\": {\n        \"number\": \"1234567890\",\n        \"verified\": True\n      },\n      \"email\": {\n        \"address\": \"myemail@email.com\",\n        \"verified\": True\n      }\n    },\n    \"address\": {\n      \"line1\": \"1 Main St\",\n      \"line2\": \"Apt 35\",\n      \"city\": \"Dallas\",\n      \"state\": \"TX\",\n      \"zipCode\": \"75000\"\n    },\n    \"income\": {\n      \"amount\": 10000,\n      \"source\": \"Employment\",\n      \"frequency\": \"Yearly\"\n    }\n  },\n  \"secondaryCardholder\": {\n    \"name\": {\n      \"first\": \"John\",\n      \"last\": \"Smith\",\n      \"middle\": \"James\"\n    },\n    \"dob\": \"2000-01-31\",\n    \"ssn\": \"123456789\",\n    \"cardNumber\": \"1234567890123456\",\n    \"communications\": {\n      \"mobilePhone\": {\n        \"number\": \"1234567890\",\n        \"verified\": True\n      },\n      \"email\": {\n        \"address\": \"myemail@email.com\",\n        \"verified\": True\n      }\n    },\n    \"address\": {\n      \"line1\": \"1 Main St\",\n      \"line2\": \"Apt 35\",\n      \"city\": \"Dallas\",\n      \"state\": \"TX\",\n      \"zipCode\": \"75000\"\n    },\n    \"income\": {\n      \"amount\": 10000,\n      \"source\": \"Employment\",\n      \"frequency\": \"Yearly\"\n    }\n  },\n  \"authorizedUsers\": [\n    {\n      \"name\": {\n        \"first\": \"John\",\n        \"last\": \"Smith\",\n        \"middle\": \"James\"\n      },\n      \"dob\": \"2000-01-31\",\n      \"ssn\": \"123456789\",\n      \"cardNumber\": \"1234567890123456\",\n      \"communications\": {\n        \"mobilePhone\": {\n          \"number\": \"1234567890\",\n          \"verified\": True\n        },\n        \"email\": {\n          \"address\": \"myemail@email.com\",\n          \"verified\": True\n        }\n      },\n      \"address\": {\n        \"line1\": \"1 Main St\",\n        \"line2\": \"Apt 35\",\n        \"city\": \"Dallas\",\n        \"state\": \"TX\",\n        \"zipCode\": \"75000\"\n      },\n      \"income\": {\n        \"amount\": 10000,\n        \"source\": \"Employment\",\n        \"frequency\": \"Yearly\"\n      }\n    }\n  ]\n}\n\nheaders = {\n  \"Content-Type\": \"application/json\",\n  \"API-Version\": \"1.0.0\",\n  \"Authorization\": \"Bearer <YOUR_JWT_HERE>\"\n}\n\nresponse = requests.post(url, json=payload, headers=headers)\n\ndata = response.json()\nprint(data)"},{"lang":"java","title":"Java","source":"import java.net.*;\nimport java.net.http.*;\nimport java.util.*;\n\npublic class App {\n  public static void main(String[] args) throws Exception {\n    var httpClient = HttpClient.newBuilder().build();\n\n    var payload = String.join(\"\\n\"\n      , \"{\"\n      , \" \\\"opa\\\": \\\"1234567890123456\\\",\"\n      , \" \\\"primaryCardholder\\\": {\"\n      , \"  \\\"name\\\": {\"\n      , \"   \\\"first\\\": \\\"John\\\",\"\n      , \"   \\\"last\\\": \\\"Smith\\\",\"\n      , \"   \\\"middle\\\": \\\"James\\\"\"\n      , \"  },\"\n      , \"  \\\"dob\\\": \\\"2000-01-31\\\",\"\n      , \"  \\\"ssn\\\": \\\"123456789\\\",\"\n      , \"  \\\"cardNumber\\\": \\\"1234567890123456\\\",\"\n      , \"  \\\"communications\\\": {\"\n      , \"   \\\"mobilePhone\\\": {\"\n      , \"    \\\"number\\\": \\\"1234567890\\\",\"\n      , \"    \\\"verified\\\": true\"\n      , \"   },\"\n      , \"   \\\"email\\\": {\"\n      , \"    \\\"address\\\": \\\"myemail@email.com\\\",\"\n      , \"    \\\"verified\\\": true\"\n      , \"   }\"\n      , \"  },\"\n      , \"  \\\"address\\\": {\"\n      , \"   \\\"line1\\\": \\\"1 Main St\\\",\"\n      , \"   \\\"line2\\\": \\\"Apt 35\\\",\"\n      , \"   \\\"city\\\": \\\"Dallas\\\",\"\n      , \"   \\\"state\\\": \\\"TX\\\",\"\n      , \"   \\\"zipCode\\\": \\\"75000\\\"\"\n      , \"  },\"\n      , \"  \\\"income\\\": {\"\n      , \"   \\\"amount\\\": 10000,\"\n      , \"   \\\"source\\\": \\\"Employment\\\",\"\n      , \"   \\\"frequency\\\": \\\"Yearly\\\"\"\n      , \"  }\"\n      , \" },\"\n      , \" \\\"secondaryCardholder\\\": {\"\n      , \"  \\\"name\\\": {\"\n      , \"   \\\"first\\\": \\\"John\\\",\"\n      , \"   \\\"last\\\": \\\"Smith\\\",\"\n      , \"   \\\"middle\\\": \\\"James\\\"\"\n      , \"  },\"\n      , \"  \\\"dob\\\": \\\"2000-01-31\\\",\"\n      , \"  \\\"ssn\\\": \\\"123456789\\\",\"\n      , \"  \\\"cardNumber\\\": \\\"1234567890123456\\\",\"\n      , \"  \\\"communications\\\": {\"\n      , \"   \\\"mobilePhone\\\": {\"\n      , \"    \\\"number\\\": \\\"1234567890\\\",\"\n      , \"    \\\"verified\\\": true\"\n      , \"   },\"\n      , \"   \\\"email\\\": {\"\n      , \"    \\\"address\\\": \\\"myemail@email.com\\\",\"\n      , \"    \\\"verified\\\": true\"\n      , \"   }\"\n      , \"  },\"\n      , \"  \\\"address\\\": {\"\n      , \"   \\\"line1\\\": \\\"1 Main St\\\",\"\n      , \"   \\\"line2\\\": \\\"Apt 35\\\",\"\n      , \"   \\\"city\\\": \\\"Dallas\\\",\"\n      , \"   \\\"state\\\": \\\"TX\\\",\"\n      , \"   \\\"zipCode\\\": \\\"75000\\\"\"\n      , \"  },\"\n      , \"  \\\"income\\\": {\"\n      , \"   \\\"amount\\\": 10000,\"\n      , \"   \\\"source\\\": \\\"Employment\\\",\"\n      , \"   \\\"frequency\\\": \\\"Yearly\\\"\"\n      , \"  }\"\n      , \" },\"\n      , \" \\\"authorizedUsers\\\": [\"\n      , \"  {\"\n      , \"   \\\"name\\\": {\"\n      , \"    \\\"first\\\": \\\"John\\\",\"\n      , \"    \\\"last\\\": \\\"Smith\\\",\"\n      , \"    \\\"middle\\\": \\\"James\\\"\"\n      , \"   },\"\n      , \"   \\\"dob\\\": \\\"2000-01-31\\\",\"\n      , \"   \\\"ssn\\\": \\\"123456789\\\",\"\n      , \"   \\\"cardNumber\\\": \\\"1234567890123456\\\",\"\n      , \"   \\\"communications\\\": {\"\n      , \"    \\\"mobilePhone\\\": {\"\n      , \"     \\\"number\\\": \\\"1234567890\\\",\"\n      , \"     \\\"verified\\\": true\"\n      , \"    },\"\n      , \"    \\\"email\\\": {\"\n      , \"     \\\"address\\\": \\\"myemail@email.com\\\",\"\n      , \"     \\\"verified\\\": true\"\n      , \"    }\"\n      , \"   },\"\n      , \"   \\\"address\\\": {\"\n      , \"    \\\"line1\\\": \\\"1 Main St\\\",\"\n      , \"    \\\"line2\\\": \\\"Apt 35\\\",\"\n      , \"    \\\"city\\\": \\\"Dallas\\\",\"\n      , \"    \\\"state\\\": \\\"TX\\\",\"\n      , \"    \\\"zipCode\\\": \\\"75000\\\"\"\n      , \"   },\"\n      , \"   \\\"income\\\": {\"\n      , \"    \\\"amount\\\": 10000,\"\n      , \"    \\\"source\\\": \\\"Employment\\\",\"\n      , \"    \\\"frequency\\\": \\\"Yearly\\\"\"\n      , \"   }\"\n      , \"  }\"\n      , \" ]\"\n      , \"}\"\n    );\n\n    var host = \"https://api.raipartners.com\";\n    var pathname = \"/b2b/portal/profile/magic-link\";\n    var request = HttpRequest.newBuilder()\n      .POST(HttpRequest.BodyPublishers.ofString(payload))\n      .uri(URI.create(host + pathname ))\n      .header(\"Content-Type\", \"application/json\")\n      .header(\"API-Version\", \"1.0.0\")\n      .header(\"Authorization\", \"Bearer <YOUR_JWT_HERE>\")\n      .build();\n\n    var response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());\n\n    System.out.println(response.body());\n  }\n}"},{"lang":"csharp","title":"C#","source":"using System;\nusing System.Net.Http;\nusing System.Threading.Tasks;\nusing System.Text;\nusing System.Text.Json;\n\npublic class Program\n{\n  public static async Task Main()\n  {\n    System.Net.Http.HttpClient client = new()\n    {\n      DefaultRequestHeaders =\n      {\n        {\"API-Version\", \"1.0.0\"},\n        {\"Authorization\", \"Bearer <YOUR_JWT_HERE>\"},\n      }\n    };\n\n    string json = JsonSerializer.Serialize(new\n    {\n      opa = \"1234567890123456\",\n      primaryCardholder = new {\n        name = new {\n          first = \"John\",\n          last = \"Smith\",\n          middle = \"James\"\n        },\n        dob = \"2000-01-31\",\n        ssn = \"123456789\",\n        cardNumber = \"1234567890123456\",\n        communications = new {\n          mobilePhone = new {\n            number = \"1234567890\",\n            verified = \"true\"\n          },\n          email = new {\n            address = \"myemail@email.com\",\n            verified = \"true\"\n          }\n        },\n        address = new {\n          line1 = \"1 Main St\",\n          line2 = \"Apt 35\",\n          city = \"Dallas\",\n          state = \"TX\",\n          zipCode = \"75000\"\n        },\n        income = new {\n          amount = \"10000\",\n          source = \"Employment\",\n          frequency = \"Yearly\"\n        }\n      },\n      secondaryCardholder = new {\n        name = new {\n          first = \"John\",\n          last = \"Smith\",\n          middle = \"James\"\n        },\n        dob = \"2000-01-31\",\n        ssn = \"123456789\",\n        cardNumber = \"1234567890123456\",\n        communications = new {\n          mobilePhone = new {\n            number = \"1234567890\",\n            verified = \"true\"\n          },\n          email = new {\n            address = \"myemail@email.com\",\n            verified = \"true\"\n          }\n        },\n        address = new {\n          line1 = \"1 Main St\",\n          line2 = \"Apt 35\",\n          city = \"Dallas\",\n          state = \"TX\",\n          zipCode = \"75000\"\n        },\n        income = new {\n          amount = \"10000\",\n          source = \"Employment\",\n          frequency = \"Yearly\"\n        }\n      },\n      authorizedUsers = new[] {\n        new {\n          name = new {\n            first = \"John\",\n            last = \"Smith\",\n            middle = \"James\"\n          },\n          dob = \"2000-01-31\",\n          ssn = \"123456789\",\n          cardNumber = \"1234567890123456\",\n          communications = new {\n            mobilePhone = new {\n              number = \"1234567890\",\n              verified = \"true\"\n            },\n            email = new {\n              address = \"myemail@email.com\",\n              verified = \"true\"\n            }\n          },\n          address = new {\n            line1 = \"1 Main St\",\n            line2 = \"Apt 35\",\n            city = \"Dallas\",\n            state = \"TX\",\n            zipCode = \"75000\"\n          },\n          income = new {\n            amount = \"10000\",\n            source = \"Employment\",\n            frequency = \"Yearly\"\n          }\n        }\n      },\n    });\n\n    using StringContent postData = new(json, Encoding.UTF8, \"application/json\");\n    using HttpResponseMessage request = await client.PostAsync(\"https://api.raipartners.com/b2b/portal/profile/magic-link\", postData);\n    string response = await request.Content.ReadAsStringAsync();\n\n    Console.WriteLine(response);\n  }\n}"},{"lang":"php","title":"PHP","source":"/**\n * Requires libcurl\n */\n\n$curl = curl_init();\n\n$payload = array(\n  \"opa\" => \"1234567890123456\",\n  \"primaryCardholder\" => array(\n    \"name\" => array(\n      \"first\" => \"John\",\n      \"last\" => \"Smith\",\n      \"middle\" => \"James\"\n    ),\n    \"dob\" => \"2000-01-31\",\n    \"ssn\" => \"123456789\",\n    \"cardNumber\" => \"1234567890123456\",\n    \"communications\" => array(\n      \"mobilePhone\" => array(\n        \"number\" => \"1234567890\",\n        \"verified\" => true\n      ),\n      \"email\" => array(\n        \"address\" => \"myemail@email.com\",\n        \"verified\" => true\n      )\n    ),\n    \"address\" => array(\n      \"line1\" => \"1 Main St\",\n      \"line2\" => \"Apt 35\",\n      \"city\" => \"Dallas\",\n      \"state\" => \"TX\",\n      \"zipCode\" => \"75000\"\n    ),\n    \"income\" => array(\n      \"amount\" => 10000,\n      \"source\" => \"Employment\",\n      \"frequency\" => \"Yearly\"\n    )\n  ),\n  \"secondaryCardholder\" => array(\n    \"name\" => array(\n      \"first\" => \"John\",\n      \"last\" => \"Smith\",\n      \"middle\" => \"James\"\n    ),\n    \"dob\" => \"2000-01-31\",\n    \"ssn\" => \"123456789\",\n    \"cardNumber\" => \"1234567890123456\",\n    \"communications\" => array(\n      \"mobilePhone\" => array(\n        \"number\" => \"1234567890\",\n        \"verified\" => true\n      ),\n      \"email\" => array(\n        \"address\" => \"myemail@email.com\",\n        \"verified\" => true\n      )\n    ),\n    \"address\" => array(\n      \"line1\" => \"1 Main St\",\n      \"line2\" => \"Apt 35\",\n      \"city\" => \"Dallas\",\n      \"state\" => \"TX\",\n      \"zipCode\" => \"75000\"\n    ),\n    \"income\" => array(\n      \"amount\" => 10000,\n      \"source\" => \"Employment\",\n      \"frequency\" => \"Yearly\"\n    )\n  ),\n  \"authorizedUsers\" => array(\n    array(\n      \"name\" => array(\n        \"first\" => \"John\",\n        \"last\" => \"Smith\",\n        \"middle\" => \"James\"\n      ),\n      \"dob\" => \"2000-01-31\",\n      \"ssn\" => \"123456789\",\n      \"cardNumber\" => \"1234567890123456\",\n      \"communications\" => array(\n        \"mobilePhone\" => array(\n          \"number\" => \"1234567890\",\n          \"verified\" => true\n        ),\n        \"email\" => array(\n          \"address\" => \"myemail@email.com\",\n          \"verified\" => true\n        )\n      ),\n      \"address\" => array(\n        \"line1\" => \"1 Main St\",\n        \"line2\" => \"Apt 35\",\n        \"city\" => \"Dallas\",\n        \"state\" => \"TX\",\n        \"zipCode\" => \"75000\"\n      ),\n      \"income\" => array(\n        \"amount\" => 10000,\n        \"source\" => \"Employment\",\n        \"frequency\" => \"Yearly\"\n      )\n    )\n  )\n);\n\ncurl_setopt_array($curl, [\n  CURLOPT_HTTPHEADER => [\n    \"API-Version: 1.0.0\",\n    \"Authorization: Bearer <YOUR_JWT_HERE>\",\n    \"Content-Type: application/json\"\n  ],\n  CURLOPT_POSTFIELDS => json_encode($payload),\n  CURLOPT_URL => \"https://api.raipartners.com/b2b/portal/profile/magic-link\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n]);\n\n$response = curl_exec($curl);\n$error = curl_error($curl);\n\ncurl_close($curl);\n\nif ($error) {\n  echo \"cURL Error #:\" . $error;\n} else {\n  echo $response;\n}"},{"lang":"go","title":"Go","source":"package main\n\nimport (\n  \"fmt\"\n  \"bytes\"\n  \"net/http\"\n  \"io/ioutil\"\n)\n\nfunc main() {\n  reqUrl := \"https://api.raipartners.com/b2b/portal/profile/magic-link\"\n  var data = []byte(`{\n    \"opa\": \"1234567890123456\",\n    \"primaryCardholder\": {\n      \"name\": {\n        \"first\": \"John\",\n        \"last\": \"Smith\",\n        \"middle\": \"James\"\n      },\n      \"dob\": \"2000-01-31\",\n      \"ssn\": \"123456789\",\n      \"cardNumber\": \"1234567890123456\",\n      \"communications\": {\n        \"mobilePhone\": {\n          \"number\": \"1234567890\",\n          \"verified\": true\n        },\n        \"email\": {\n          \"address\": \"myemail@email.com\",\n          \"verified\": true\n        }\n      },\n      \"address\": {\n        \"line1\": \"1 Main St\",\n        \"line2\": \"Apt 35\",\n        \"city\": \"Dallas\",\n        \"state\": \"TX\",\n        \"zipCode\": \"75000\"\n      },\n      \"income\": {\n        \"amount\": 10000,\n        \"source\": \"Employment\",\n        \"frequency\": \"Yearly\"\n      }\n    },\n    \"secondaryCardholder\": {\n      \"name\": {\n        \"first\": \"John\",\n        \"last\": \"Smith\",\n        \"middle\": \"James\"\n      },\n      \"dob\": \"2000-01-31\",\n      \"ssn\": \"123456789\",\n      \"cardNumber\": \"1234567890123456\",\n      \"communications\": {\n        \"mobilePhone\": {\n          \"number\": \"1234567890\",\n          \"verified\": true\n        },\n        \"email\": {\n          \"address\": \"myemail@email.com\",\n          \"verified\": true\n        }\n      },\n      \"address\": {\n        \"line1\": \"1 Main St\",\n        \"line2\": \"Apt 35\",\n        \"city\": \"Dallas\",\n        \"state\": \"TX\",\n        \"zipCode\": \"75000\"\n      },\n      \"income\": {\n        \"amount\": 10000,\n        \"source\": \"Employment\",\n        \"frequency\": \"Yearly\"\n      }\n    },\n    \"authorizedUsers\": [\n      {\n        \"name\": {\n          \"first\": \"John\",\n          \"last\": \"Smith\",\n          \"middle\": \"James\"\n        },\n        \"dob\": \"2000-01-31\",\n        \"ssn\": \"123456789\",\n        \"cardNumber\": \"1234567890123456\",\n        \"communications\": {\n          \"mobilePhone\": {\n            \"number\": \"1234567890\",\n            \"verified\": true\n          },\n          \"email\": {\n            \"address\": \"myemail@email.com\",\n            \"verified\": true\n          }\n        },\n        \"address\": {\n          \"line1\": \"1 Main St\",\n          \"line2\": \"Apt 35\",\n          \"city\": \"Dallas\",\n          \"state\": \"TX\",\n          \"zipCode\": \"75000\"\n        },\n        \"income\": {\n          \"amount\": 10000,\n          \"source\": \"Employment\",\n          \"frequency\": \"Yearly\"\n        }\n      }\n    ]\n  }`)\n  req, err := http.NewRequest(\"POST\", reqUrl, bytes.NewBuffer(data))\n  if err != nil {\n    panic(err)\n  }\n  req.Header.Add(\"Content-Type\", \"application/json\")\n  req.Header.Add(\"API-Version\", \"1.0.0\")\n  req.Header.Add(\"Authorization\", \"Bearer <YOUR_JWT_HERE>\")\n  res, err := http.DefaultClient.Do(req)\n  if err != nil {\n    panic(err)\n  }\n  defer res.Body.Close()\n  body, err := ioutil.ReadAll(res.Body)\n  if err != nil {\n    panic(err)\n  }\n\n  fmt.Println(res)\n  fmt.Println(string(body))\n}"},{"lang":"ruby","title":"Ruby","source":"require 'json'\nrequire 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI('https://api.raipartners.com/b2b/portal/profile/magic-link')\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest['Content-Type'] = 'application/json'\nrequest['API-Version'] = '1.0.0'\nrequest['Authorization'] = 'Bearer <YOUR_JWT_HERE>'\nrequest.body = {\n  opa: '1234567890123456',\n  primaryCardholder: {\n    name: {\n      first: 'John',\n      last: 'Smith',\n      middle: 'James'\n    },\n    dob: '2000-01-31',\n    ssn: '123456789',\n    cardNumber: '1234567890123456',\n    communications: {\n      mobilePhone: {\n        number: '1234567890',\n        verified: true\n      },\n      email: {\n        address: 'myemail@email.com',\n        verified: true\n      }\n    },\n    address: {\n      line1: '1 Main St',\n      line2: 'Apt 35',\n      city: 'Dallas',\n      state: 'TX',\n      zipCode: '75000'\n    },\n    income: {\n      amount: 10000,\n      source: 'Employment',\n      frequency: 'Yearly'\n    }\n  },\n  secondaryCardholder: {\n    name: {\n      first: 'John',\n      last: 'Smith',\n      middle: 'James'\n    },\n    dob: '2000-01-31',\n    ssn: '123456789',\n    cardNumber: '1234567890123456',\n    communications: {\n      mobilePhone: {\n        number: '1234567890',\n        verified: true\n      },\n      email: {\n        address: 'myemail@email.com',\n        verified: true\n      }\n    },\n    address: {\n      line1: '1 Main St',\n      line2: 'Apt 35',\n      city: 'Dallas',\n      state: 'TX',\n      zipCode: '75000'\n    },\n    income: {\n      amount: 10000,\n      source: 'Employment',\n      frequency: 'Yearly'\n    }\n  },\n  authorizedUsers: [\n    {\n      name: {\n        first: 'John',\n        last: 'Smith',\n        middle: 'James'\n      },\n      dob: '2000-01-31',\n      ssn: '123456789',\n      cardNumber: '1234567890123456',\n      communications: {\n        mobilePhone: {\n          number: '1234567890',\n          verified: true\n        },\n        email: {\n          address: 'myemail@email.com',\n          verified: true\n        }\n      },\n      address: {\n        line1: '1 Main St',\n        line2: 'Apt 35',\n        city: 'Dallas',\n        state: 'TX',\n        zipCode: '75000'\n      },\n      income: {\n        amount: 10000,\n        source: 'Employment',\n        frequency: 'Yearly'\n      }\n    }\n  ]\n}.to_json\n\nresponse = http.request(request)\nputs response.read_body\n"},{"lang":"r","title":"R","source":"library(httr)\n\nbody = '{\n   \"opa\": \"1234567890123456\",\n   \"primaryCardholder\": {\n    \"name\": {\n     \"first\": \"John\",\n     \"last\": \"Smith\",\n     \"middle\": \"James\"\n    },\n    \"dob\": \"2000-01-31\",\n    \"ssn\": \"123456789\",\n    \"cardNumber\": \"1234567890123456\",\n    \"communications\": {\n     \"mobilePhone\": {\n      \"number\": \"1234567890\",\n      \"verified\": true\n     },\n     \"email\": {\n      \"address\": \"myemail@email.com\",\n      \"verified\": true\n     }\n    },\n    \"address\": {\n     \"line1\": \"1 Main St\",\n     \"line2\": \"Apt 35\",\n     \"city\": \"Dallas\",\n     \"state\": \"TX\",\n     \"zipCode\": \"75000\"\n    },\n    \"income\": {\n     \"amount\": 10000,\n     \"source\": \"Employment\",\n     \"frequency\": \"Yearly\"\n    }\n   },\n   \"secondaryCardholder\": {\n    \"name\": {\n     \"first\": \"John\",\n     \"last\": \"Smith\",\n     \"middle\": \"James\"\n    },\n    \"dob\": \"2000-01-31\",\n    \"ssn\": \"123456789\",\n    \"cardNumber\": \"1234567890123456\",\n    \"communications\": {\n     \"mobilePhone\": {\n      \"number\": \"1234567890\",\n      \"verified\": true\n     },\n     \"email\": {\n      \"address\": \"myemail@email.com\",\n      \"verified\": true\n     }\n    },\n    \"address\": {\n     \"line1\": \"1 Main St\",\n     \"line2\": \"Apt 35\",\n     \"city\": \"Dallas\",\n     \"state\": \"TX\",\n     \"zipCode\": \"75000\"\n    },\n    \"income\": {\n     \"amount\": 10000,\n     \"source\": \"Employment\",\n     \"frequency\": \"Yearly\"\n    }\n   },\n   \"authorizedUsers\": [\n    {\n     \"name\": {\n      \"first\": \"John\",\n      \"last\": \"Smith\",\n      \"middle\": \"James\"\n     },\n     \"dob\": \"2000-01-31\",\n     \"ssn\": \"123456789\",\n     \"cardNumber\": \"1234567890123456\",\n     \"communications\": {\n      \"mobilePhone\": {\n       \"number\": \"1234567890\",\n       \"verified\": true\n      },\n      \"email\": {\n       \"address\": \"myemail@email.com\",\n       \"verified\": true\n      }\n     },\n     \"address\": {\n      \"line1\": \"1 Main St\",\n      \"line2\": \"Apt 35\",\n      \"city\": \"Dallas\",\n      \"state\": \"TX\",\n      \"zipCode\": \"75000\"\n     },\n     \"income\": {\n      \"amount\": 10000,\n      \"source\": \"Employment\",\n      \"frequency\": \"Yearly\"\n     }\n    }\n   ]\n}'\n\nurl = \"https://api.raipartners.com/b2b/portal/profile/magic-link\"\n\ndata_req <- POST(\n  url,\n  add_headers(\"Content-Type\" = \"application/json\", \"API-Version\" = \"1.0.0\", \"Authorization\" = \"Bearer <YOUR_JWT_HERE>\"),\n  body = body,\n  encode = \"json\",\n  verbose()\n)\n\ncontent(data_req)"},{"lang":"json","title":"Payload application/json","source":"{\n  \"opa\": \"1234567890123456\",\n  \"primaryCardholder\": {\n    \"name\": {\n      \"first\": \"John\",\n      \"last\": \"Smith\",\n      \"middle\": \"James\"\n    },\n    \"dob\": \"2000-01-31\",\n    \"ssn\": \"123456789\",\n    \"cardNumber\": \"1234567890123456\",\n    \"communications\": {\n      \"mobilePhone\": {\n        \"number\": \"1234567890\",\n        \"verified\": true\n      },\n      \"email\": {\n        \"address\": \"myemail@email.com\",\n        \"verified\": true\n      }\n    },\n    \"address\": {\n      \"line1\": \"1 Main St\",\n      \"line2\": \"Apt 35\",\n      \"city\": \"Dallas\",\n      \"state\": \"TX\",\n      \"zipCode\": \"75000\"\n    },\n    \"income\": {\n      \"amount\": 10000,\n      \"source\": \"Employment\",\n      \"frequency\": \"Yearly\"\n    }\n  },\n  \"secondaryCardholder\": {\n    \"name\": {\n      \"first\": \"John\",\n      \"last\": \"Smith\",\n      \"middle\": \"James\"\n    },\n    \"dob\": \"2000-01-31\",\n    \"ssn\": \"123456789\",\n    \"cardNumber\": \"1234567890123456\",\n    \"communications\": {\n      \"mobilePhone\": {\n        \"number\": \"1234567890\",\n        \"verified\": true\n      },\n      \"email\": {\n        \"address\": \"myemail@email.com\",\n        \"verified\": true\n      }\n    },\n    \"address\": {\n      \"line1\": \"1 Main St\",\n      \"line2\": \"Apt 35\",\n      \"city\": \"Dallas\",\n      \"state\": \"TX\",\n      \"zipCode\": \"75000\"\n    },\n    \"income\": {\n      \"amount\": 10000,\n      \"source\": \"Employment\",\n      \"frequency\": \"Yearly\"\n    }\n  },\n  \"authorizedUsers\": [\n    {\n      \"name\": {\n        \"first\": \"John\",\n        \"last\": \"Smith\",\n        \"middle\": \"James\"\n      },\n      \"dob\": \"2000-01-31\",\n      \"ssn\": \"123456789\",\n      \"cardNumber\": \"1234567890123456\",\n      \"communications\": {\n        \"mobilePhone\": {\n          \"number\": \"1234567890\",\n          \"verified\": true\n        },\n        \"email\": {\n          \"address\": \"myemail@email.com\",\n          \"verified\": true\n        }\n      },\n      \"address\": {\n        \"line1\": \"1 Main St\",\n        \"line2\": \"Apt 35\",\n        \"city\": \"Dallas\",\n        \"state\": \"TX\",\n        \"zipCode\": \"75000\"\n      },\n      \"income\": {\n        \"amount\": 10000,\n        \"source\": \"Employment\",\n        \"frequency\": \"Yearly\"\n      }\n    }\n  ]\n}"}]},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["API Call Response:"]}," ","This endpoint returns a payload containing a magic-link"]},{"$$mdtype":"Tag","name":"OpenApiResponseSample","attributes":{"descriptionFile":"api-docs-apis/b2b.json","operationId":"registerProfileMagicLink","responseSamplesResolved":[{"lang":"json","title":"200 application/json","source":"{\n  \"magicLink\": \"string\"\n}"},{"lang":"json","title":"400 application/json","source":"{\n  \"type\": \"urn:raipartners:api:b2b:errors:validation:invalid-data\",\n  \"title\": \"Bad Request\",\n  \"status\": 400,\n  \"detail\": \"One or more fields are invalid.\"\n}"},{"lang":"json","title":"401 application/json","source":"{\n  \"type\": \"urn:raipartners:api:b2b:errors:authorization:unauthorized\",\n  \"title\": \"Unauthorized\",\n  \"status\": 401,\n  \"detail\": \"You are not authorized to perform this action.\"\n}"},{"lang":"json","title":"403 application/json","source":"{\n  \"type\": \"urn:raipartners:api:b2b:errors:authorization:forbidden\",\n  \"title\": \"Forbidden\",\n  \"status\": 403,\n  \"detail\": \"You are forbidden to perform this action.\"\n}"},{"lang":"json","title":"404 application/json","source":"{\n  \"type\": \"urn:raipartners:api:b2b:errors:not-found\",\n  \"title\": \"Not Found\",\n  \"status\": 404,\n  \"detail\": \"Resource not found.\"\n}"},{"lang":"json","title":"500 application/json","source":"{\n  \"type\": \"urn:raipartners:api:b2b:errors:internal\",\n  \"title\": \"Internal Server Error\",\n  \"status\": 500,\n  \"detail\": \"An unexpected error occurred.\"\n}"},{"lang":"json","title":"503 application/json","source":"{\n  \"type\": \"urn:raipartners:api:b2b:errors:internal\",\n  \"title\": \"Service unavailable Error\",\n  \"status\": 503,\n  \"detail\": \"Service is unavailable.\"\n}"}]},"children":[]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]}]},"headings":[{"value":"B2B API Profile Management Guide","id":"b2b-api-profile-management-guide","depth":1},{"value":"Overview","id":"overview","depth":2},{"value":"Create profiles","id":"create-profiles","depth":2},{"value":"Standard profile creation","id":"standard-profile-creation","depth":3},{"value":"Profile creation with instant login link","id":"profile-creation-with-instant-login-link","depth":3}],"frontmatter":{"seo":{"title":"B2B API Profile Management Guide"}},"lastModified":"2026-10-13T16:14:21.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/b2b-api/profile-management","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}