Is there a unique identifier for officers sent back from SGW?

I couldn’t find a unique identifier for officers in json from Company’s House. Am I missing something or how can I get that data?

Your title mentions SGW - what is this?

Unique identifier

That depends:
If you call the Officer list endpoint (for a given company) you’ll get the officeList resource. This will return the information for each officer but there isn’t a specific “identifier” associated with each officer record here. Essentially there’s no unique ID because this dataset (or our access) doesn’t link them to something else. (If you need some kind of unique ID yourself to organise things there’s nothing to stop you creating one yourself but obviously it’s down to you to map this and avoid clashes etc.)

However that’s not quite the end of the story because in the “links” section of each item (officer record) there should be an “officer” section with “appointments”. This holds the something like e.g.:

"/officers/Rcye6xfT35E0SeA3Keyy-HLeLzU/appointments"    

Call that endpoint in Companies House API and it will show you appointments for that officer. So the “Rcye6xfT35E0SeA3Keyy-HLeLzU” bit is kind of an ID - but for the officer appointments “dataset”, not the officer list one. (Caveat - I have no idea how things work behind the scenes and how Companies House store and link their actual data - so I’m using “dataset” and “link” loosely e.g. may or may not be the same actual data).

Be wary about “IDs” as you’ll find the metaphor can be quite limited. For example there’s an Officer Disqualifications endpoint - but Companies House have stated that this is separate from the Officer Appointments / Company Officers “dataset”.

That ‘appointments ID’ referred to by @voracityemail is actually pretty good for what you’re looking for - it appears to be (and I think someone at CH once said to us) a hash of information unique to an officer (i.e. name, address, and presumably some other confidential information not provided by CH to consumers).

That said, it only works one way - if you know that an officer has the same ID they are the same person (barring unlikely hash conflicts); but if they don’t have the same ID they aren’t necessarily different people. We sometimes come across the same director having multiple IDs; we’re not sure why as we can’t introspect.

Cheers,
Alex